n = int(input()) l, r = 0, 10 ** 10 while r - l > 1: m = (l + r) // 2 if m * (m + 1) // 2 < n: l = m else: r = m print(r)