At the end of a game, each of the five members of a basketball team shake hands with each of the five members of the other team, and all of the players shake hands with the two referees. How many handshakes occur?

Let's think step by step and output the final answer within \boxed{}.
user