import math n = int(input()) s = int(math.sqrt(n)) while s * s < n: s += 1 while s * s > n: s -= 1 ans = 2 * s if s * s == n: ans -= 1 print(ans)