n = int(input()) l = 0 r = n while r - l > 1: c = l + r >> 1 cnt = 0 if (c + 1) * c // 2 >= n: r = c else: l = c print(r)