Sevnety-eight players entered a single elimination tennis tournament.How many matches were played to determine the overall champ?

please help me...and if u get the answer can you explain how you got it with a rule or a pattern

In the first round, with 78 players, there would be 39 matches. However, with the 39 winners, there would be 18 matches and one bye. With the 9 winners and one bye, there would be 5 matches. With the five winners, there would be two more matches and one bye. I would assume the bye then would play one of the winners, and the winner of that match would play the other winner for the championship. How many matches is that?