Terence, Mirza and Elliot had some stamps. Mirza and Elliot together had 3 times as many stamps as Terence. The ratio of the number of stamps Mirza had to the number of stamps Elliot had was 3:7. Terence and Elliot had 310 stamps altogether. How many stamps did Terence have?