N = int(input()) n = 0 i = 1 while n < N: n += i i += 1 print(i-1)