A. Acrobatic Jumping
time limit per test
0.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Amy the acrobat is preparing for a very important competition. As part of her preparation, Amy always trains with the same rules as the competitions she participates in, no matter how strange they may seem. The next competition Amy will compete in will take place in a stadium with a line measuring $$$N$$$ meters. There are three rules that Amy must follow in the competition:

  • Her first jump starts at the line at meter 0 and she must jump 1 meter.
  • The last jump must end at meter $$$N$$$ of the stadium and it must have been a 1-meter jump.
  • In each jump between the first and the last, she must jump $$$k$$$, $$$k-1$$$, or $$$k+1$$$ meters, where $$$k$$$ is the length of the previous jump.

Amy is worried about the rules because her way of guaranteeing victory has always been to reach the finish line in the fewest possible jumps, but with the given rules it is too complex for her, that is why she is asking for your help. Given the length of the stadium, help Amy determine the minimum number of jumps she must take in her performance while following the established rules.

Input

The first and only line of input contains a single integer $$$N$$$ ($$$2 \leq N \leq 10^{12}$$$), the length of the stadium

Output

Output a line containing an integer number, the minimum number of jumps Amy should take in her performance following the stablished rules.

Examples
Input
2
Output
2
Input
3
Output
3
Input
4
Output
3