2362. WonderTeam

单点时限: 2.0 sec

内存限制: 256 MB

The Brasileiro League is the most important event in Brazil. There are 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 1 to n according to the total points. The rank of each team t having p points is one plus the number of teams having more than p points. It is possible that more than one team have the same ranks.

In addition to the Champion (the 1st ranked team or teams), the 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.

输入格式

There are multiple test cases in the input. Each test case consists of only one line containing n (1 ≤ n ≤ 50), the number of teams in league. The input terminates with a line containing 0.

输出格式

For each test case, write a single line containing the worst possible rank for the WonderTeam.

样例

Input
1
3
0
Output
1
1

10 人解决,12 人已尝试。

11 份提交通过,共有 17 份提交。

5.0 EMB 奖励。

创建: 15 年,7 月前.

修改: 6 年,8 月前.

最后提交: 3 年,5 月前.

来源: Tehran 2007-2008

题目标签