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