# -*- coding:utf-8 -*- import math while True: h=int(input()) x=int(math.sqrt(h)) while x: if x*(x+1)<=h: break x-=1 print(x)