There are 39 students in the bike club.

All but 8 of them participated in a race.

What is the total cost if each student who entered the race paid $6?