Kavi is ranked 9th from the top and 38th from the bottom in a class. How many students are there in the class?