2. (5 points) On Valentine's Day, every student in the school gave each female student a valentine. It turned out that the number of valentines was 36 more than the total number of students. How many valentines were given?
Answer: 76

Solution: Let $x, y$ be the number of boys and girls in the school, respectively. According to the problem, $x y=x+y+36$. Then $(x-1)(y-1)=37$. Therefore, the numbers $x-1$ and $y-1$ are 1 and 37. The number of valentines is $2 \cdot 38=76$.