At a particular school, all students participate in at least one out of three activities: debate, music, and community service. 3 students do all three activities, 21 students do two or more activities, half of all students participate in music, and the ratio of participants in debate, music, and community service, respectively, is $5:4:3$. What is the total number of students at the school?