import math N = int(input()) result = int(math.isqrt(N - 1)) print(result)