For a provided integer k, find the maximum value of m+n, where 1⩽m,n⩽k and (n2−nm−m2)2=1.
Note: The answer can exceed the range of a 32-bit integer.
Input format
The only line of the input contains one integer k.
Output format
Print the maximum value of m+n, where 1⩽m,n⩽k and (n2−nm−m2)2=1.
Constraints
1⩽k⩽1018
In the first test case k=2 , n=2 and m=1 satisfying the given condition and maximum value =2+1=3.