At snack time, Ms. Rivera passes out 24 cookies to her class. She also passes out 1 glass of lemonade to each student. This equation correctly represents the total number of items distributed, where a is the number of students in the class.

a(2+1)=36
What is the value of a?