The average weight of students in a class is 40 kg. If the total weight of all the students is 1840 kg, then the number of students in the class is