A. Bouncy Castle
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

While Magikarp was playing Minecraft, he raided a few too many villages, so now he has $$$n$$$ beds. To make the most out of them, he wants to make a huge "bouncy castle" consisting of a large square that is covered in beds. Given that each bed is a $$$2\times 1$$$ domino shape that can be rotated, and that beds cannot overlap, what is the largest square that can be filled in entirely using his $$$n$$$ beds? Note that beds may be sticking out of the square if needed.

Sample for $$$n=9$$$
Input

The first line contains a single integer $$$n$$$ $$$(1\le n \le 10^9)$$$ — the number of beds that Magikarp has.

Output

Output a single integer, the maximum side length square that Magikarp can create using his $$$n$$$ beds.

Example
Input
9
Output
4
Note

One possible configuration of 9 beds is shown in the image above. The maximum size square he can make is 4, and it can be shown that no larger squares can be made.