from math import sqrt
n = int(input())
m = int(sqrt(2*n)) 
if m*(m+1)/2>=n: print(m) 
elif(m+1)*(m+2)/2>=n: print(m+1)