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