import sys

input = sys.stdin.readline





def main():

    X = int(eval(input()))

    x = 0

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

        x += i

        if x >= X:

            print(i)

            return





if __name__ == '__main__':

    main()

import sys

import math

input = sys.stdin.readline





def main():

    X = int(eval(input()))

    print((math.ceil((-1 + math.sqrt(1+8*X))/2)))





if __name__ == '__main__':

    main()

import sys

input = sys.stdin.readline


def main():
    X = int(eval(input()))
    x = 0
    for i in range(1, X + 1):
        x += i
        if x >= X:
            print(i)
            return


if __name__ == "__main__":
    main()

import sys
import math

input = sys.stdin.readline


def main():
    X = int(eval(input()))
    print((math.ceil((-1 + math.sqrt(1 + 8 * X)) / 2)))


if __name__ == "__main__":
    main()

+import math -    x = 0 -    for i in range(1, X + 1): -        x += i -        if x >= X: -            print(i) -            return +    print((math.ceil((-1 + math.sqrt(1 + 8 * X)) / 2)))