eolymp
bolt
Try our new interface for solving problems
Problems

WonderTeam

WonderTeam

The \textit{Brasileiro League} is the most important event in Brazil. There are \textbf{n }football teams participating in the competitions, each team plays twice (home and away) against each other team. Each team receives three points for a win and one point for a draw. No point is awarded for a loss. When the games are finished, teams are ranked by numbers from \textbf{1 }to \textbf{n }according to the total points. The rank of each team \textbf{t }having \textbf{p }points is one plus the number of teams having more than \textbf{p }points. It is possible that more than one team have the same ranks. In addition to the Champion (the \textbf{1}^st ranked team or teams), the \textit{WonderTeam} is also awarded, if there exists one. The team that has absolutely the highest number of wins (absolutely means no other teams has the same number of wins), absolutely the highest number of goals scored, and absolutely the lowest number of goals conceded, is called the WonderTeam. (WonderTeam should have all these properties.) Your task is to find out the worst possible rank for the WonderTeam. \InputFile Consists of multiple test cases. Each test case consists of one line containing \textbf{n }(\textbf{1 }≤ \textbf{n }≤ \textbf{50}), the number of teams in league. The input terminates with a line containing \textbf{0}. \OutputFile For each test case write a single line containing the worst possible rank for the WonderTeam.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1
3
0
Output example #1
1
1
Source 2007 32nd ACM International Collegiate, 9th Asian Regional Contest in Iran, December 6-7 (Azar 15-16, 1386), Problem A