from math import isqrt n=int(input()) s=isqrt(n) if n<=s*(s+1): s-=1 print(s+n//(s+1))