The 24 students in the class are 24 years old on average.When the age of the teacher is taken into account, the average rises by 1.What age is the teacher?