Nick has bought a fog machine for Halloween and is helping organize a party where the fog machine will be used to set the mood.
To operate the fog machine, Nick initializes it with a positive integer . The fog that comes out of the machine then moves as follows:
- The initial upward velocity of the fog is , and the initial -coordinate of the fog is .
- While the fog has positive upward velocity, simulate the following steps in order:
- Increase the -coordinate of the fog by the upward velocity.
- Decrease the upward velocity by .
- After this point, the fog has reached its maximum height.
There is a smoke detector at that will go off if fog reaches a -coordinate greater than or equal to that of the smoke detector.
Compute the largest possible value of that Nick can initialize the fog machine to without setting off the smoke detector.
Constraints
Input Specification
The first and only line of input contains a positive integer .
Output Specification
Output the maximum possible integer value of . It can be shown that, under the constraints of the problem, the answer is always a finite positive integer.
Sample Input 1
3
Sample Output 1
1
Sample Explanation 1
If is set to , the maximum height the fog reaches is . However, if is set to , the maximum height the fog reaches is . Therefore, the answer is .
Sample Input 2
4
Sample Output 2
2
Sample Explanation 2
If is set to , the maximum height the fog reaches is . However, if is set to , the maximum height the fog reaches is . Therefore, the answer is .
Comments