In a class of 120 students, 50 failed in C, and 80 failed in Java. 20 students passed in both the subjects. How many students passed exactly in one of the two subjects?