import sys

read = sys.stdin.buffer.read

input = sys.stdin.buffer.readline

inputs= sys.stdin.buffer.readlines

#rstrip().decode('utf-8')



#import numpy as np

#import operator

import bisect

#from heapq import heapify,heappop,heappush

#from math import gcd

#from fractions import gcd

#from collections import deque

#from collections import defaultdict

#from collections import Counter

#from itertools import accumulate

#from itertools import groupby

#from itertools import permutations

#from itertools import combinations

#from scipy.sparse import csr_matrix

#from scipy.sparse.csgraph import floyd_warshall

#from scipy.sparse.csgraph import csgraph_from_dense

#from scipy.sparse.csgraph import dijkstra

#sys.setrecursionlimit(10**7)



#map(int,input().split())



def main():

    X=int(eval(input()))

    li=[i*(i+1)//2 for i in range(10**5) if i*(i+1)//2<10**9]

    print((bisect.bisect_left(li,X)))





if __name__ == '__main__':

    main()
import sys

input = sys.stdin.buffer.readline



#sys.setrecursionlimit(10**9)

#from functools import lru_cache



def RD(): return input().rstrip().decode()

def II(): return int(eval(input()))

def FI(): return int(eval(input()))

def MI(): return list(map(int,input().split()))

def MF(): return list(map(float,input().split()))

def LI(): return list(map(int,input().split()))

def LF(): return list(map(float,input().split()))

def TI(): return tuple(map(int,input().split()))

# rstrip().decode()





def main():

	n=II()

	for i in range(10**10):

		if (i*(i+1))//2>=n:

			print(i)

			exit()









if __name__ == "__main__":

	main()

import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines
# rstrip().decode('utf-8')
# import numpy as np
# import operator
import bisect

# from heapq import heapify,heappop,heappush
# from math import gcd
# from fractions import gcd
# from collections import deque
# from collections import defaultdict
# from collections import Counter
# from itertools import accumulate
# from itertools import groupby
# from itertools import permutations
# from itertools import combinations
# from scipy.sparse import csr_matrix
# from scipy.sparse.csgraph import floyd_warshall
# from scipy.sparse.csgraph import csgraph_from_dense
# from scipy.sparse.csgraph import dijkstra
# sys.setrecursionlimit(10**7)
# map(int,input().split())
def main():
    X = int(eval(input()))
    li = [i * (i + 1) // 2 for i in range(10**5) if i * (i + 1) // 2 < 10**9]
    print((bisect.bisect_left(li, X)))


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.buffer.readline
# sys.setrecursionlimit(10**9)
# from functools import lru_cache
def RD():
    return input().rstrip().decode()


def II():
    return int(eval(input()))


def FI():
    return int(eval(input()))


def MI():
    return list(map(int, input().split()))


def MF():
    return list(map(float, input().split()))


def LI():
    return list(map(int, input().split()))


def LF():
    return list(map(float, input().split()))


def TI():
    return tuple(map(int, input().split()))


# rstrip().decode()
def main():
    n = II()
    for i in range(10**10):
        if (i * (i + 1)) // 2 >= n:
            print(i)
            exit()


if __name__ == "__main__":
    main()

-read = sys.stdin.buffer.read -inputs = sys.stdin.buffer.readlines -# rstrip().decode('utf-8') -# import numpy as np -# import operator -import bisect +# sys.setrecursionlimit(10**9) +# from functools import lru_cache +def RD(): +    return input().rstrip().decode() -# from heapq import heapify,heappop,heappush -# from math import gcd -# from fractions import gcd -# from collections import deque -# from collections import defaultdict -# from collections import Counter -# from itertools import accumulate -# from itertools import groupby -# from itertools import permutations -# from itertools import combinations -# from scipy.sparse import csr_matrix -# from scipy.sparse.csgraph import floyd_warshall -# from scipy.sparse.csgraph import csgraph_from_dense -# from scipy.sparse.csgraph import dijkstra -# sys.setrecursionlimit(10**7) -# map(int,input().split()) + +def II(): +    return int(eval(input())) + + +def FI(): +    return int(eval(input())) + + +def MI(): +    return list(map(int, input().split())) + + +def MF(): +    return list(map(float, input().split())) + + +def LI(): +    return list(map(int, input().split())) + + +def LF(): +    return list(map(float, input().split())) + + +def TI(): +    return tuple(map(int, input().split())) + + +# rstrip().decode() -    X = int(eval(input())) -    li = [i * (i + 1) // 2 for i in range(10**5) if i * (i + 1) // 2 < 10**9] -    print((bisect.bisect_left(li, X))) +    n = II() +    for i in range(10**10): +        if (i * (i + 1)) // 2 >= n: +            print(i) +            exit()