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