Question 21
Fermat school organizes three trips. Half its students join the first, four fifths join the second, and nine tenths join the third. Exactly 500 students join all three trips; every other student joins exactly two. How many students are in the school?