max_participants = min(20, max(300, course-participants + 10))
if (max_participants ≥ 50
if (max_participants ≥ 150