import sys input = sys.stdin.readline N=int(input()) NG=1 OK=10**9 while OK-NG>1: mid=(OK+NG)//2 if mid*(mid+1)//2>=N: OK=mid else: NG=mid print(OK)