If there are 27 teams there will be 26 games.
Had there been 32 teams the knockout system would start with 16 games each with two teams, so that there would be 16 winning teams. At the next round there would be 8 games and 8 winners; then 4 games and 4 winners; then 2 games and 2 winners; the final game would have one winning team. Total number of games=31.
With 27 teams we have 5 fewer games than we would have had if there had been 32 teams. So in the first round there must be 11 games. In the remaining rounds there will be 8+4+2+1=15 games making up the total of 26 games. In the second round there will be 8 games and 16 teams.
22 teams are needed to play 11 games and there will be 11 winning teams to go forward to the second round. 5 more teams are needed to compete with the winners of the first round to make up the 16 teams needed for the second round of 8 games.
Let's suppose the teams have numbers T1 to T27. T1 to T5 do not compete in the first round.
T6 to T27 form the 22 teams for the first 11 games. Suppose the winning teams are T6 to T16 (T17 to T27 have been eliminated). In the second round we have T1 to T16. Suppose the winning teams for the 8 games in this round are T1 to T8, they will go forward to the 3rd round, and the winners will be, say, T1 to T4. In the 4th round in the 4 games, there will be 2 winning teams. Call them T1 and T2 who compete in the final 5th round, with T1 as the winner of the tournament.