In a classroom, the teacher wants to distribute notebooks to students in a way that each student receives a proportional amount based on their needs. There are 24 students in the class. One-third of the students need 2 notebooks each, one-fourth of the students need 3 notebooks each, and the remaining students need 1 notebook each. How many notebooks does the teacher need in total? Let's think step by step and output the final answer within \boxed{}.
user