import math n = int(input()) r = math.sqrt(n / 3) floor_r = math.floor(r) x = floor_r + 999999 print(x)