One ninth of the students in Mr. Beck’s class list red as their favorite color. Twice as many students call blue their favorite, and three times as many students prefer pink. The rest name green as their favorite color. If 6 students call blue their favorite color, how many students are in Mr. Beck’s class?