A teacher wants to group her pupils into groups of 3 or 5 or 6. However, she found out that if she do that there will always be 1 pupil left. What is the least possible number of pupils in the class?

31