In an examination, 60% of the candidates passed in English and 70% of the candidates passed in Mathematics, but 20% failed in both subjects. If 2500 candidates passed in both the subjects, the number of candidates who appeared at the examination was :