import sys



stdin = sys.stdin



ns = lambda : stdin.readline().rstrip()

na = lambda : list(map(int, stdin.readline().split()))

ni = lambda : int(ns())

def main():

  n = ni()

  f = lambda x: (x * (x+1)) // 2

  for i in range(1, n+1):

    if (f(i) >= n):

      print(i)

      return

main()
import sys



stdin = sys.stdin



ns = lambda : stdin.readline().rstrip()

ni = lambda : int(ns())

na = lambda : list(map(int, stdin.readline().split()))



def main():

  n = ni()

  t = 0

  for i in range(1, n + 1):

    t += i

    if t >= n:

      print(i)

      return

main()
import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
na = lambda: list(map(int, stdin.readline().split()))
ni = lambda: int(ns())


def main():
    n = ni()
    f = lambda x: (x * (x + 1)) // 2
    for i in range(1, n + 1):
        if f(i) >= n:
            print(i)
            return


main()

import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))


def main():
    n = ni()
    t = 0
    for i in range(1, n + 1):
        t += i
        if t >= n:
            print(i)
            return


main()

+ni = lambda: int(ns()) -ni = lambda: int(ns()) -    f = lambda x: (x * (x + 1)) // 2 +    t = 0 -        if f(i) >= n: +        t += i +        if t >= n: