n = int(input()) l,r=0,n+1 while l<=r: mid=(l+r)//2 if mid*(mid+1)