n = int(input()) x = int(n ** 0.5) + 5 while x * x > n: x -= 1 print(x + n // (x + 1))