A class of boys and girls exchange valentine's day cards. Each boy gives a card to each girl and each girl gives a card to each boy. Of course, this means that the total number of cards given to girls by boys equals the total number of cards given to boys by girls. The teacher of the class notices that if each boy had given 3 fewer cards and if each girl had given 2 fewer cards, then the total number of boy-to-girl cards would still equal the total number of girl-to-boy cards. The teacher also noticed that while every girl in the class had given her a card, only half of the boys had remembered a card for their teacher. Suppose that the teacher received a total of C cards from the class. In terms of this number C, how many students are in this class?