Problem:
 Score : 200 points    Problem Statement There is a kangaroo at coordinate 0 on an infinite number line that runs from left to right, at time 0 .
During the period between time i-1 and time i , the kangaroo can either stay at his position, or perform a jump of length exactly i to the left or to the right.
That is, if his coordinate at time i-1 is x , he can be at coordinate x-i , x or x+i at time i .
The kangaroo's nest is at coordinate X , and he wants to travel to coordinate X as fast as possible.
Find the earliest possible time to reach coordinate X .      Constraints  X is an integer.  1≤X≤10^9         Input The input is given from Standard Input in the following format:  X       Output Print the earliest possible time for the kangaroo to reach coordinate X .        Sample Input 1 6      Sample Output 1 3  The kangaroo can reach his nest at time 3 by jumping to the right three times, which is the earliest possible time.       Sample Input 2 2      Sample Output 2 2  He can reach his nest at time 2 by staying at his position during the first second, and jumping to the right at the next second.       Sample Input 3 11      Sample Output 3 5

Solution (Python):
def main():
    import sys
    import math
    import collections
    import itertools

    input = sys.stdin.readline().rstrip

    x = int(input())
    i = 1
    while i * (i + 1) < 2 * x:
        i += 1

    
    
    print(i)

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())

sum_ = 0
for i in range(10**5):
  sum_ += i
  if(sum_ >= X): 
    ans = i
    break

print(ans)

Solution (Python):
x = int(input())

for i in range(x):
  if ((i**2+3*i+2)/2)>=x and ((i**2+i)/2)<=x:
    print(i+1)
    exit()

Solution (Python):
n=int(input())
t=1
while True:
    if t*(t+1)//2>=n:
        print(t)
        break
    t+=1

Solution (Python):
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()

Solution (Python):
X = int(input())
i = 0
while i*(i+1)//2 < X:
    i += 1
print(i)

Solution (Python):
x = int(input())

k = (x*2+1/4)**(1/2) - 1/2


k=int(k)

if k*(k+1) >= 2*x:
    k -= 1

print(k+1)

Solution (Python):
from math import sqrt

X = int(input())

result = int(sqrt(X * 2)) - 1  
while result * (result + 1) // 2 < X:
    result += 1
print(result)

Solution (Python):
x = int(input())
place = 0
for t in range(1, x + 1):
  place += t
  if x <= place:
    print(t)
    exit()

Solution (Python):
import sys

X = int(input())
cnt = 0
tmp = 0
for i in range(1, X + 5):
    if tmp < X:
        tmp += i
        cnt += 1
    else:
        print(cnt)
        sys.exit()

Solution (Python):
X = int(input())
for n in range(1,X+1):
  if n*(n-1)<=2*(X-1)<n*(n+1):
    print(n)
    exit()
if X==0:print("0")
if X==1:print("1")

Solution (Python):
X = int(input())
tmp=0
for n in range(1,X+1):
  tmp+=n
  if tmp>=X:
    print(n)
    exit()
if X==0:print("0")
if X==1:print("1")

Solution (Python):
x = int(input())
temp = 0
for i in range(x+1):
  temp += i
  if temp >= x:
    print(i)
    exit()

Solution (Python):
x = int(input())
temp = 0
for i in range(x+1):
  temp += i
  if temp >= x:
    print(i)
    exit()

Solution (Python):
x = int(input())

n = 0
for i in range(1, x+1):
    n += i
    if n >= x:
        r = n-x
        t = i
        break


print(t)

Solution (Python):
n=int(input())
i=1
count=0
sum=0
while sum<n:
  sum+=i
  count+=1
  i+=1
print(count)

Solution (Python):


X = int(input())
s = 0
i = 0
while s < X:
    i += 1
    s += i
print(i)

Solution (Python):
import sys
import math

def main():
    x = int(input())
    for i in range(x+1):
        if i*(i+1)/2>=x:
            print(i)
            sys.exit()

if __name__ == "__main__":
    sys.exit(main())

Solution (Python):
X = int(input())

i = 0
num = 0

while True:
  num += i
  if num >= X:
    break
  i += 1

print(i)

Solution (Python):
x = int(input())
i = 0
num = 0
while True:
    num += i
    if num >= x:
        break
    i += 1
print(i)

Solution (Python):
x = int(input())
ans = 0
X = 0
i = 1
while X < x:
    ans += 1
    X += i
    i += 1
print(ans)

Solution (Python):
import math

x = int(input())

print(math.ceil((-1 + (1 + 8 * x) ** 0.5) / 2))

Solution (Python):
X = int(input())
time = 0
while X > 0:
  time += 1
  X -= time
print(time)

Solution (Python):
import math
X = int(input())
t = (-1 + (1 + 8 * X)**0.5) / 2
print(math.ceil(t))

Solution (Python):
x = int(input())
ans = 0
i_sum= 0
while True:
    if i_sum >= x:
        break
    ans += 1
    i_sum += ans
    
print(ans)

Solution (Python):
x = int(input())

t = 0
s = 0
while s < x:
    t += 1
    s += t
print(t)

Solution (Python):
X = int(input())

def main():
    t = 0
    curr = 0
    while curr < X:
        t += 1
        curr += t
    print(t)

if __name__ == '__main__':
    main()

Solution (Python):
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
na = lambda : 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()

Solution (Python):


x = int(input())

t = 0
while t * (t + 1) / 2 < x:
    t += 1

print(t)

Solution (Python):
from math import ceil
x=int(input())
print(ceil((-1+(1+8*x)**0.5)/2))

Solution (Python):

X = int(input())


n = 0
tmp = 0
while tmp < X:
    n += 1
    tmp += n

print(n)

Solution (Python):
n=int(input());p=0;i=1
while p+i<n:p+=i;i+=1
print(i)

Solution (Python):
x=int(input())
i=0
while i<=10**5:
    if int(i*(i-1)/2)<x<=int(i*(i+1)/2):
        print(i)
        break
    else:
        i+=1

Solution (Python):
from sys import stdin
X = int(stdin.readline().rstrip())
dist = 0
ans = 0
for i in range(0,10**9+1):
    if dist >= X:
        break
    dist += i
    ans += 1
print(ans-1)

Solution (Python):
X = int(input())
for i in range(1, X + 1):
    if (i*(i+1)/2 >= X):
        print(i)
        break

Solution (Python):
x = int(input())
lo = 0
hi = x


def check(n, a):
    return (n * (n + 1)) // 2 >= a


while hi - lo > 1:
    m = lo + (hi - lo) // 2
    if check(m, x):
        hi = m
    else:
        lo = m
print(hi)

Solution (Python):
import sys
input = sys.stdin.readline
x=int(input())

c=0
for i in range(1,10**10):
    c+=i
    if x<=c:
        print(i)
        break

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7



N = int(input())
summary = 0

i = 0
while summary < N:
    i += 1
    summary += i

print(i)

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
res = 0
for i in range(1,10**10):
    res += i
    if res >= n:
        print(i)
        break

Solution (Python):
n = int(input())
x,count = 1,1
while x <= n:
    x += count
    count += 1
print(count-1)

Solution (Python):
n = int(input())
x,count = 1,1
while x < n:
    x += count
    count += 1
print(count if x == n else count-1)

Solution (Python):
def resolve():
    x = int(input())
    i = 0
    steps = 0
    while steps < x:
        i += 1
        steps = i * (i + 1) // 2
    print(i)


if __name__ == "__main__":
    resolve()

Solution (Python):
def resolve():
    x = int(input())
    for i in range(1, 10 ** 5):
        steps = i * (i + 1) // 2
        if steps >= x:
            print(i)
            return 0


if __name__ == "__main__":
    resolve()

Solution (Python):

import sys


def solve(X: int):

    for i in range(10000000):
        a = i*(i+1)//2
        if(a >= X):
            print(i)
            exit()
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    global X
    X = int(next(tokens))  
    solve(X)

if __name__ == '__main__':
    main()

Solution (Python):
X=int(input())

for i in range(10**10):
  if i*(i+1)//2>=X:
    print(i)
    break

Solution (Python):
x=int(input())
now=0
for i in range(1000000000):
  now=now+i
  if(now>=x):
    print(i)
    exit()

Solution (Python):
import math
print(math.ceil((-1+(1+8*int(input()))**0.5)/2))

Solution (Python):
import math
print(math.ceil((-1 + (1 + 8 * int(input())) ** 0.5)/2))

Solution (Python):
x = int(input())
i = 1
while x > i:
  x -= i
  i += 1
print(i)

Solution (Python):
from math import floor
x = int(input())
a = floor((2*x)**.5)
while a * (a + 1) / 2 < x:
  a += 1
  
print(a)

Solution (Python):

x = int(input())
ans = 0
m = 0
while x > m:
    ans += 1
    m += ans
    
print(ans)

Solution (Python):
X = int(input())
ans = 0
i = 1
count = 0
while True:
    count += 1
    ans += i
    if X <= ans:
        break
    i += 1
print(count)

Solution (Python):
n = int(input())
ans = -((0.5 - ((1+8*n)**0.5)/2)//1)
print(int(ans))

Solution (Python):
x = int(input())
for i in range(x+1):
         if (i ** 2 + i) // 2 >= x:
                  print(i)
                  break

Solution (Python):
x = int(input())
ans = 0
for i in range(x+1):
         if (i ** 2 + i) // 2 >= x:
                  print(i)
                  break

Solution (Python):
X = int(input())
i = 1
d = 0
while d < X:
    d += i
    i += 1
print(i-1)

Solution (Python):
x=int(input())
a=0
for i in range(10**5):
  a+=i
  if a>=x:
    print(i)
    exit()

Solution (Python):
import math
x = int(input())
t = (-1 + math.sqrt(1 + 8 * x)) / 2
if int(t) < t:
  t = int(t) + 1
else:
  t = int(t)
print(t)

Solution (Python):
print(int((2*int(input())-.25)**.5+.5))

Solution (Python):
N = int(input())

ans = 0
tmp = 0
while tmp < N:
  ans += 1
  tmp += ans
print(ans)

Solution (Python):
x = int(input())
ans = 0
if abs(x) == 1:
    print(1)
else:
    for i in range(x//2 + 10):
        an = i*(i-1) / 2
        if an >= x:
            print(i-1)
            break

Solution (Python):
N = int(input())

ans = 0

for i in range(N+1):
    ans += i
    if N <= ans:
        print(i)
        exit()

Solution (Python):
n=int(input())

for i in range(1,n+1):
  if (i*(i+1))/2>=n:
    cnt=i
    break
print(cnt)

Solution (Python):
import sys

N = int(input())
tmp = 0
for i in range(10**5 + 1000):
	tmp += i
	if tmp >= N:
		print(i)
		sys.exit()

Solution (Python):
X = int(input())
a = 1

while a*(a+1)//2<X:
  a+=1

print(a)

Solution (Python):
X = int(input())
x = 0
a = 0

while x<X:
  a+=1
  x+=a

print(a)

Solution (Python):
x=int(input())
n=1
while x>n*(n+1)/2:
  n+=1
print(n)

Solution (Python):
x=int(input())
i=1
ans=0
while ans<x:
    ans+=i
    i+=1
print(i-1)

Solution (Python):
import sys
import copy
import string
import  math
from _bisect import *
from collections import *
from operator import itemgetter
from math import factorial
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

x = ni()
s = 0
i = 1
while True:
    s += i
    if s >= x:
        ans = i
        break
    i += 1
print(ans)

Solution (Python):
X = int(input())
x = 0
t = 0

while True:
    t += 1
    x += t
    if x >= X:
        break

print(t)

Solution (Python):
x = int(input())

tmp = 0
for i in range(x+1):
    tmp += i

    if tmp >= x:
        print(i)
        break

Solution (Python):
X=int(input())
total=0
count=0
i=1
while total<X:
    total+=i
    count+=1
    i+=1
print(count)

Solution (Python):
X = int(input())

for i in range(1, 10**5):
    tmp = i * (i+1) // 2
    if X <= tmp :
        print(i)
        break

Solution (Python):
x = int(input())

i = 1
temp = 0

while temp < x:
    temp += i
    i += 1

print(i-1)

Solution (Python):
x = int(input())

fact = 1
cnt = 1
while fact < x:
    cnt += 1
    fact += cnt
print(cnt)

Solution (Python):
x = int(input())

ans = 0
y = 0
while y < x:
    ans += 1
    y += ans

print(ans)

Solution (Python):
X = int(input())
cur = 0
i = 0
while cur < X:
  i += 1
  cur += i
print(i)

Solution (Python):
X = int(input())
count = tmp = i = 0
while(tmp<X):
    i += 1
    count += 1
    tmp += i
print(count)

Solution (Python):
import math
n=int(input())
print(math.ceil((-1+math.sqrt(8*n+1))/2))

Solution (Python):
X = int(input())

cnt = 0
for i in range(1, X+1):

    cnt += i
    if cnt >= X:
        break
        
print(i)

Solution (Python):
x=int(input())
t=1
while True:
  if t*(t+1)//2 < x:
    t+=1
  else:
    break
print(t)

Solution (Python):
N=int(input())
ans=0
for i in range(1,N+1):
  if i*(i+1)//2>=N:
    ans=i
    break
print(ans)

Solution (Python):
X = int(input())
for i in range(100000):
    if 2 * X <= i * (i + 1):
        print(i)
        exit()

Solution (Python):
import copy

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)
n =ip()
s = 0
a = 0
while s<n:
    a+=1
    s+=a
print(a)

Solution (Python):
n = int(input())

tmp = 0

for i in range(n+1):
    tmp += i
    if tmp >= n:
        print(i)
        exit()

Solution (Python):
X=int(input())
i=0
x=0
while x<X:
  i+=1
  x+=i
print(i)

Solution (Python):
X = int(input())
i = 0
x = 0
while x < X:
  i += 1
  x += i
print(i)

Solution (Python):


X = int(input().split()[0])
total = 0
for x in range(1, X+1):
    total += x
    if total >= X:
        break

ans = x

print(ans)

Solution (Python):
import numpy as np
import math

X = int(input())

i = math.ceil(np.sqrt(2*np.abs(X)+0.25)-0.5)

print(i)

Solution (Python):
X=int(input())
s=0
for i in range(X+1):
    s+=i
    if s >= X:break
print(i)

Solution (Python):
def main():
    X = int(input())
    for n in range(1, X+1):
        lower = (n-1)*n//2
        upper = n*(n+1)//2
        if lower < X <= upper:
            return n



if __name__ == '__main__':
    print(main())

Solution (Python):

S = int(input())
count = 0
for t in range(S):
    if (t*(t+1))/2 >= S:
        break
    else:
        count = count + 1

print(count)

Solution (Python):
from math import ceil, sqrt
x=int(input())

n=(sqrt(8*x+1)-1)*0.5
n=ceil(n)

print(n)

Solution (Python):
X = int(input().strip())
now_max = 0
for i in range(1,X+1):
  now_max += i
  if X <= now_max:
    print(i)
    break

Solution (Python):
def main():
    x = int(input())
    tmp = 0
    i = 0
    while tmp < x:
        i += 1
        tmp += i
    print(i)

if __name__ == "__main__":
    main()

Solution (Python):
x = int(input())
i = 1
while 1:
    if (i * (i + 1)) / 2 >= x:
        print(i)
        exit()
    i += 1

Solution (Python):
import sys
x=int(input())
a=1
for i in range(10**9):
  a+=i
  if a>x:
    print(i)
    sys.exit()

Solution (Python):
N = int(input())

acc = 0
for i in range(N+1):
    acc += i
    if acc >= N:
        print(i)
        exit()

Solution (Python):
from math import sqrt, floor, ceil


n = int(input())
if floor(sqrt(n * 2)) * ceil(sqrt(n * 2)) < n * 2:
    print(ceil(sqrt(n * 2)))
else:
    print(floor(sqrt(n * 2)))

Solution (Python):
import math
X = int(input())
n = int((math.sqrt(1+8*X)-1)/2)
if X > n*(n+1)//2:
  n += 1
print(n)

Solution (Python):
x = int(input())
t = 1
for t in range(1, x+1):
    if (t * (t + 1)) / 2 >= x:
        break
print(x if t == x else t)

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

X = int(sys.stdin.readline())
print(int(math.ceil((-1 + math.sqrt(1 + 8 * X)) / 2)))

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

X = int(sys.stdin.readline())
ans = 0
x = 1
s = 0
while s < X:
    s += x
    x += 1
print(x - 1)

Solution (Python):
X = int(input())
N = int((- 1 + (1 + 8 * X)**0.5) / 2)
if X != N*(N+1)//2:
    print(N+1)
else:
    print(N)

Solution (Python):

import sys
INF = float("inf")


def solve(X: int):

    def isOK(m):
        return X <= m*(m+1)/2

    ng = -1
    ok = X

    while abs(ok - ng) > 1:
        mid = (ok + ng)//2
        if isOK(mid):
            ok = mid
        else:
            ng = mid
    print(ok)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    X=int(input())
    p = 0
    count = 0
    for i in range(1,X+1):
        count += 1
        p += i
        if p < X:
            continue
        else:
            break

    print(count)

if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
i=1
while True:
  if i*(i+1)//2>=x:break
  i+=1
print(i)

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 




 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    X = inputInt()
    
    ans = 0
    total = 0
    for i in range(1,X+1):
        total += i
        if total >= X:
            ans = i
            break
            
    print(ans)
    
    
if __name__ == "__main__":
	main()

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 




 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    X = inputInt()
    
    ans = (math.sqrt(8*X+1)-1)/2
    
    print(int(math.ceil(ans)))
    
    
if __name__ == "__main__":
	main()

Solution (Python):
X = int(input())

ans = 0
sums = 0
while sums < X:
    ans += 1
    sums += ans
print(ans)

Solution (Python):
X = int(input())
cnt = 0
for i in range(1,X+1):
        cnt += i
        if cnt >= X:
                break
print(i)

Solution (Python):
X = int(input())

ans = X
for n in range(1, X):
    if n * (n + 1) >= 2 * X:
        ans = min(ans, n)
        break

print(ans)

Solution (Python):
x = int(input())

i = 1
c = 1
while c<x:
    i+=1
    c+=i
if 1<x-c and x-c<=i:
    ans = i-1
else:
    ans = i
print(ans)

Solution (Python):
x = int(input())
t = 0
for i in range(10 ** 9):
    t += i
    if t >= x:
        print(i)
        exit()

Solution (Python):

import collections
import itertools
import sys

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

x=getint()

for i in range(x+10000000000000000):
    s = i * (i + 1) // 2
    if s >= x:
        print(i)
        break

Solution (Python):
x = int(input())
sun = 0
for i in range(1,10**9):
  if x <= sun:
    print(i-1)
    break
  sun += i

Solution (Python):
x = int(input())
cnt = 0
i = 0
while x>cnt:
    i += 1
    cnt += i
    
print(i)

Solution (Python):
x = int(input())
for i in range(0, 10**9):
  low = (i - 1 * (i)) / 2
  high = (i * (i + 1)) / 2
  if(low < x and x <= high):
    print(i)
    exit()

Solution (Python):
X = int(input())

cnt = 0
total = 0
i = 1
while True:
  total += i
  cnt += 1
  if total >= X:
    break
  i += 1
print(cnt)

Solution (Python):
import math
X = int(input())
i = 1
print(math.ceil(((1+8*X)**0.5-1)/2))

Solution (Python):


def resolve():
    x = int(input())
    n = 1
    while True:
        if (n*(n+1))//2 >= x:
            break
        else:
            n += 1
    print(n)


if __name__ == "__main__":
    resolve()

Solution (Python):
x = int(input())
now = 0
ans = 0
i = 1
while now < x:
    now += i
    ans += 1
    i += 1
print(ans)

Solution (Python):

import sys, math, fractions, itertools


def solve(X: int):
    print(math.ceil((math.sqrt(8*X+1)-1) / 2))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
now = 0
ans = 0
i = 1
while now < X:
    now += i
    ans += 1
    i += 1
print(ans)

Solution (Python):
X = abs(int(input()))

x = 0
i = 1
while True:
    x+=i
    if x >= X:
        print(i)
        break
    i+=1

Solution (Python):
from sys import stdin
X = int(stdin.readline().rstrip())
ans = 0
while ans*(ans+1) < 2*X:
    ans += 1
print(ans)

Solution (Python):
N = int(input())
sum_step = 0
cnt = 1
while True:
  sum_step += cnt
  if sum_step >= N:
    print(cnt)
    break
  cnt += 1

Solution (Python):
def main():
    X = int(input())
    i = 1
    t = 0
    while X > t:
        t += i
        i += 1
    print(i - 1)


main()

Solution (Python):

import itertools
from collections import Counter
from collections import defaultdict
import bisect
from heapq import heappush, heappop

def main():
    x = int(input())

    i = 1
    while True:
        if i * (i + 1) // 2 >= x:
            print(i)
            break
        i += 1

if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
max_step = 0
for i in range(x+1):
    max_step += i
    if max_step >= x:
        print(i)
        break

Solution (Python):
X = int(input())

A = [0]
c = 0
while True:
    c += 1
    k = A[-1] + c
    if k >= X:
        break
    A.append(k)

print(c)

Solution (Python):
x=int(input())
s=0
for i in range(x+1):
    s+=i
    if s>=x:print(i);break

Solution (Python):
import math
x = int(input())

i = 1
while True:
    if i * (i+1) / 2 >= x:
        print(i)
        break
    i += 1

Solution (Python):
x = int(input())
a = 0
while a * (a + 1) // 2 < x:
    a += 1
print(a)

Solution (Python):
x = int(input())
ans = 0
for i in range(x+1):
    ans += i
    if ans >= x:
        print(i)
        break

Solution (Python):
from copy import *
from sys import *
import math
import queue
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


def main():
	x = int(input())
	s = 0
	i = 1
	while s<x:
		s += i
		i += 1
	print(i-1)


def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(m,n):
	x = max(m,n)
	y = min(m,n)
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	return y

class queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
X = int(input())
ans = 0
p = 0
i = 0
while p < X:
  i += 1
  p += i
print(i)

Solution (Python):



def main():
    num = int(input())

    ans_ind = 1
    ans_sum = 0
    while ans_sum < num:
        ans_sum += ans_ind
        ans_ind += 1

    print(ans_ind - 1)







if __name__ == '__main__':
    main()

Solution (Python):
import math

x = int(input())

t = (-1+math.sqrt(8*x+1))/2

if t.is_integer():
    print(int(t))
else:
    print(int(t)+1)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b = LS()
    if a == b:
        print("H")
    else:
        print("D")
    return


def B():
    w, a, b = LI()
    a, b = min(a, b), max(a, b)
    if w + a >= b:
        print(0)
        return
    print(b-a-w)
    return


def C():
    n = II()
    x = 0
    for i in range(1, 10 ** 5):
        x += i
        if n <= x:
            print(i)
            return
    return


def D():
    return


if __name__ == '__main__':
    C()

Solution (Python):
x=int(input())
n=0
c=0
while 1:
  if(x<=n):
    print(c)
    exit()
  c+=1
  n+=c

Solution (Python):
def main():
    x=int(input())
    ans = max((-1+(1+8*x)**0.5)/2,(-1-(1+8*x)**0.5)/2)
    ans = -1*(ans//-1)
    print(int(ans))
if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())

print(int(-(-(-1 + (1 + 8 * X) ** 0.5) // 2)))

Solution (Python):

X = int(input())

ans = 0
cnt = 0

while ans < X:
    
    cnt += 1
    ans += cnt


print (cnt)

Solution (Python):
x=int(input())
c=0
i=1
p=0
while p<x:
    p+=i
    c+=1
    i+=1
print(c)

Solution (Python):

import sys
sys.setrecursionlimit(300000)


def solve(X: int):
    i = 1
    while i * (i + 1) // 2 < X:
        i += 1
    ret = i
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)

if __name__ == '__main__':
    main()

Solution (Python):
X = int(input())
n = 0
for i in range(1, X+1):
    n += i
    if n>=X:
        cnt = i
        break
print(cnt)

Solution (Python):
n = int(input())

for i in range(10**5):
    if (i*i+i)//2 < n <= (i+1)*(i+2)//2:
        print(i+1)
        break

Solution (Python):
X = int(input())

ans = 0
for i in range(1,X+1):
    ans += i
    if ans >= X:
        print(i)
        exit()

Solution (Python):
x=int(input())






i=0
now=0
while 1:
    i+=1
    now+=i
    if now>=x:
        print(i)
        break

Solution (Python):
x = int(input())
mv = 10**6
cnt = 0
for i in range(mv):
  cnt += i
  if cnt >= x:
    print(i)
    exit()

Solution (Python):
X=int(input())
m=int((2*X)**(0.5))
while True:
    s=(m*(m+1))//2
    if s>=X:
        print(m)
        break
    else:m+=1

Solution (Python):
x = int(input())
cnt = 0
i = 0
while True:
    cnt += (i+1)
    i += 1
    if cnt >= x:
        break
print(i)

Solution (Python):
x=int(input())
y=int((x*2)**0.5)
yy=(y*(y+1))//2
while yy<x:
    y+=1
    yy+=y
print(y)

Solution (Python):
x=int(input())
cnt=0
i=0
while i<x:
	cnt+=1
	i+=cnt
print(cnt)

Solution (Python):
"""
カンガルー
時刻iで長さiのジャンプをするx-i,x,x+i
0からスタートして、座標Xにつくまでの時間
"""

X = int(input())

n = int((2*X)**0.5)+1
S = n*(n+1)//2

if S-X >= n:
    print(n-1)
else:
    print(n)

Solution (Python):
from math import sqrt
from math import ceil
x = int(raw_input())

def eq(x):
    a1 = (-1 + sqrt(1-4*(-2*x)))/2
    a2 = (-1 - sqrt(1-4*(-2*x)))/2
    if a1 >= 0 and a2 >= 0:
        return int(ceil(min(a1, a2)))
    elif a1 >= 0 and a2 < 0:
        return int(ceil(a1))
    return int(ceil(a2))
n = eq(x)
for n in range(n, -1, -1):
    if n*(n+1) - 2*x < 0:
        break
print n + 1

Solution (Python):
X = int(input())
s = 0
for i in range(100000000):
    if s < X:
        s += i
    elif s >= X:
        t = i-1
        break
print(t)

Solution (Python):
X = int(input())
n = 0
for i in range(1, 100000):
    if(i*(i+1)/2>=X):
        n = i
        break
print(n)

Solution (Python):
X=int(input())
sum=0
for i in range(X+1):
    sum+=i
    if sum>=X:
        print(i)
        exit()

Solution (Python):
from math import ceil
X=int(input())
n=ceil((-1+(1+8*X)**(1/2))/2)
print(n)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

X = n()

for x in range(1, X):
    if x * (x + 1) // 2 >= X:
        print(x)
        import sys
        sys.exit()

print(X)

Solution (Python):
x = int(input())
time = 0
dis = 0

while True:
    time += 1
    dis += time
    if dis >= x:
        break
print(time)

Solution (Python):

import sys


X = int(input())

tmp = 0
for ans in range(1, X + 1):
    tmp += ans
    if tmp >= X: break

print(ans)

Solution (Python):
x = int(input())
ans = 1
total = 0
while(total<x):
    total += ans
    ans += 1
print(ans-1)

Solution (Python):
x = int(input())

ans =0
for i in range(1,x+1):
    ans += i
    if ans>=x:
        print(i)
        exit()

Solution (Python):
X = int(input())

ans = 0
for i in range(1,X+1):
    ans += i
    if ans >= X:
        print(i)
        exit()

Solution (Python):
X = int(input())

x = 0
count = 1
while x < X:
    x += count
    count +=1

print (count-1)

Solution (Python):
def main():
	X = int(input())
	i = 1
	while (i*(i+1))//2 < X:
		i += 1
	print(i)


if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
a=0
for i in range(1,x*10):
    a+=i
    if a>=x:break
print(i)

Solution (Python):
import math
def main():
    X = 2*int(input())
    n = 1
    while X > n*(n+1):
        n += 1
    print(n)
main()