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):
x = int(input())
cnt = 0
while x>0:
  cnt += 1
  x = max(0,x-cnt)
print(x+cnt)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

X = int(input())
fac = {}
fac[0] = 0
for i in range(1, 50000):
    fac[i] = fac[i-1]+i
    if fac[i]>=10**9:
        break

for i in range(1, 50000):
    f = fac[i]
    if f>=X:
        print(i)
        break

Solution (Python):









import os
import sys


from math import sqrt


def main():
    X = abs(int(input()))
    s = (-1+sqrt(1+8*X))/2
    if s.is_integer():
        s = int(s)
    else:
        s = int(s) + 1
    print(s)



if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
sys.setrecursionlimit(10**7)

def calcTime(x,n=0):
  if n*(n+1)//2 >= x:
    return n
  else:
    return calcTime(x,n+1)

x = int(input())
print(calcTime(x))

Solution (Python):
def calcTime(x):
  n = 0
  while True:
    if n*(n+1)//2 > x:
   	  return n
    elif n*(n+1)//2 == x:
      return n
    else:
      n += 1

x = int(input())
ans = calcTime(x)
print(ans)

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

Solution (Python):
import math

X = int(input())

x = max(0, int(math.sqrt(X)) - 10)

while True:
    xx = x * (x + 1) // 2
    if X <= xx:
        print(x)
        exit()
    else:
        x += 1

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    """
    X+i+(i+1)+(i+2)+..
    
    X < n*(n+1)//2

    n*(n+1)//2-(n-1)*n//2 > n ?
    n//2(2) > n ? false
    """
    X = read_int()
    if X == 1:
        return 1
    low, high = 1, 10**9
    while high-low > 1:
        mid = low+(high-low)//2
        if mid*(mid+1)//2 >= X:
            high = mid
        else:
            low = mid
    if high*(high+1)//2 == X:
        return high
    return high


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

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

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

Solution (Python):

x = int(input())
a = int((x * 2)**0.5)
while a * (a + 1) // 2 > x:
    a -= 1
print(a + (a * (a + 1) // 2 != x))

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

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

Solution (Python):
x = int(input())
'''
t =  1, 2, 3, 4, 5, 6,...
d+ = 1, 3, 6,10,15,21,...
x = 11のとき、
t = 5,d+ = 15より、t = 4で一回休みすればいい
-> 行き過ぎたら一回休み
'''
i = 0
d = 0
while True:
    i += 1
    d += i
    if x <= d:
        ans = i
        break
print(ans)

Solution (Python):
X = int(input())
for i in range(int((2 * X)**0.5) - 2, 10**9):
  if 2 * X <= i * (i + 1):
    print(i)
    break

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

num = 0
i = 1
while abs_x > num:
  num += i
  i += 1
print(i - 1)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    X = int(readline())

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

    print(ans)
    return


if __name__ == '__main__':
    main()

Solution (Python):



from math import ceil
x = int(input())
tmp = 0
for i in range(x + 1):
    tmp += i
    if tmp >= x:
        print(i)
        exit()

print("うんち！")

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

Solution (Python):
X = int(input())
ans = -1
c = 0
for i in range(1, 10**6):
    c += i
    if 0 <= c - X <= i:
        ans = i
        break
print(ans)

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


if __name__ == "__main__":
    main()

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

Solution (Python):
import sys, math
from collections import defaultdict
sys.setrecursionlimit(500000)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    X = ii()
    s = 0
    i = 1
    while s < X:
        s += i
        i += 1
    print(i-1)

if __name__ == '__main__':
    main()

Solution (Python):
import sys

def main():
    X=int(input())
    s=0
    i=0
    while s<X:
        i+=1
        s+=i
    print(i)
if __name__=='__main__':
    main()

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

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

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

K=0
while (K*(K+1))//2<X:
    K+=1
print(K)

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

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

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

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

print(a)

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

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

ans=0
l_befor=0
for n in range(10**7):
    l_befor = n+l_befor
    if l_befor >= X:
        ans=n
        break
print(ans)

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

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

Solution (Python):
X = int(input())
count = 0
step = 0
while X > step:
    count += 1
    step += count
print(count)

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

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

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd





def solve():
    n = int(input())
    pos = 0
    i = 0
    while pos < n:
        i += 1
        pos += i
    print(min(n, i))

t = 1

for case in range(1,t+1):
    ans = solve()


"""

abc

"""

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

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

s = 0

t = 1
while True:
    s += t
    if s >= x:
        break
    
    t += 1
    
print(t)

Solution (Python):
def solve():
    X = int(input())
    cnt = 0
    sm = 0
    while sm < X:
        sm += cnt + 1
        cnt += 1

    print(cnt)

if __name__ == '__main__':
    solve()

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

X = int(input())

s = 0
i = 1
while True:
    s += i
    if X <= s:
        print(i)
        break
    i += 1

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

for i in range(X + 1):
    acc += i
    if X <= acc:
        ans = i
        break
print(i)

Solution (Python):
import math
X = int(input())
m = math.sqrt(X * 2)
t = 0
for i in range(1, math.ceil(m) + 1):
  t += i
  if t >= X:
    print(i)
    exit()

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

Solution (Python):
import itertools
x = int(input())
itr = list(itertools.accumulate([i for i in range(100000)]))
for i in range(100000):
  if itr[i] < x <= itr[i + 1]:
    print(i + 1)
    exit()

Solution (Python):
from collections import defaultdict
from collections import deque
import itertools
import math

def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()

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

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

X = i()
cnt = 0
for i in range(1,10**7):
    cnt += i
    if cnt >= X:
        print(i)
        exit()

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

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

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

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

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

Solution (Python):
x = abs(int(input()))
ans = 0
length = 0
while x > length:
    ans+=1
    length += ans
print(ans)

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

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

ans = 0
sum = 0

for i in range(1, 10**9):
    sum += i
    ans += 1
    if sum >= N:
        print(ans)
        exit()

Solution (Python):






X = int(input())





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

Solution (Python):
def resolve():
    '''
    code here
    '''
    X = int(input())
    memo = 0
    res = 0
    for i in range(1, X+3):
        memo += i
        if memo >= X:
            res = i
            break
    print(res)

if __name__ == "__main__":
    resolve()

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

y = 0

for i in range(1, X+1):
    y += i
    if y >= X:
        print(i)
        break

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

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

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


def read():
    X = int(input().strip())
    return X,


def solve(X):
    t = 0
    x = 0
    while x < X:
        t += 1
        x += t
    return t


if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))

Solution (Python):
def main():
    X = int(input())
    r = 0
    for i in range(X+1):
        r += i
        if r >= X:
            return i
print(main())

Solution (Python):
X=int(input())
acc=0
cnt=0
t=0
while True:
    if acc>=X:
        break
    t+=1
    acc+=t
    cnt+=1
print(cnt)

Solution (Python):
X=int(input())
ans=[0]
for i in range(1,10**9):
    temp=ans[-1]+i
    ans.append(temp)
    if temp>=X:
        print(i)
        exit()

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

i=0
k=0
while x>k:
    i+=1
    k+=i
    

print(i)

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = i()

for i in range(1,N+1):
    if 2*N <= (i+1)*i:
        print(i)
        break

Solution (Python):
X=int(input())
a=0
b=0
for i in range(1,10**6):
  b+=i
  a+=1
  if X<=b:
    print(a)
    exit()

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

Solution (Python):

X = int(input())

sum = 0
for i in range(1,X+1):
    sum = sum + i
    if sum >= X:
        break

print(i)

Solution (Python):
x = int(input())
si = 0
i = 1
while True:
    nsi = si + i
    if si < x <= nsi:
        break
    si = nsi
    i += 1

print(i)

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

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

total = 0
now = 1

while total < x:
    total += now
    now += 1

print(now-1)

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

x = INT()
i = 1
while(x-i>0):
    x -= i
    i += 1
print(i)

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

num = 0
i = 0
while num < x:
    i += 1
    num += i
if (num - x) < i:
    print(i)

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

i = 1
N = 0
while N < X:
    N += i
    i += 1
i -= 1
print(i)

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

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

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

Solution (Python):

def main():
    X = int(input())
    maxX = 0
    time = 0
    while maxX < X :
        time += 1
        maxX += time

    print(time)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())

    for i in range(1, n + 1):
        min_lim = (i - 1) * i // 2 + 1
        max_lim = i * (i + 1) // 2
        if min_lim <= n <= max_lim:
            print(i)
            sys.exit()


if __name__ == '__main__':
    main()

Solution (Python):
print(int(((8*int(input())+1.000000000001)**0.5-1)/2+0.99999999))

Solution (Python):

x = int(input())


t = int((-1+(1+8*x)**0.5)//2)

if t * (t+1) // 2 >= x:
    print(t)
else:
    print(t+1)

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr



def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


inf = 10 ** 18
mod = 10 ** 9 + 7

x = ir()
tmp = x
ans = 0
while tmp > 0:
    ans += 1
    tmp-=ans
print(ans)

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

s = 0
for i, a in enumerate(range(1, x+1), start=1):
    s += a
    if s >= x:
        print(i)
        exit()

exit()

Solution (Python):
import math

import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    x = int(ipt())
    for i in range(10**9):
        if i*(i+1)//2 >= x:
            print(i)
            exit()

    return

if __name__ == '__main__':
    main()

Solution (Python):


x = int(input())
t = 0
while True:
    if t*(t+1)/2 >= x:
        print(t)
        break
    t += 1

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

y = 0
i = 1
cnt = 0
while y < x:
   y += i
   i += 1
   cnt += 1
   if y >= x:
      break
print(cnt)

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

count = 0
num = 1
jamp_count = 0
while count < X:
    count += num
    num += 1
    jamp_count += 1

print(jamp_count)

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

for t in range(int(1e5)):
    s = (t + 1) * t / 2
    if s >= x:
        print(t)
        exit()

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

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

from itertools import accumulate

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

print(ans)

Solution (Python):
d = int(input())
t = 0 
while True:
  if t*(t+1)//2 >=d:
    print(t)
    exit()
  t +=1

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

ans=0
sum=0

for i in range(0,50000):
    sum+=i
    if sum>=x:
        break
    
    ans+=1

print(ans)

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

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

Solution (Python):
n = int(input())
for i in range(1, 2*10**5):
    score = (i*(i+1))//2
    if score >= n:
        print(i)
        exit()

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

ans = 0
total = 0
for i in range(1, 10**9):
    total += i
    if total >= x:
        ans = i
        break

print(ans)

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())
ans = 0
i = 1
while ans < X:
    ans += i
    i += 1
print(i-1)

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

Solution (Python):
import numpy as np

x = int(input())

t = np.arange(100000)
ans = np.where(t*(t + 1)//2 >= x)[0][0]

print(ans)

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

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

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

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

Solution (Python):
X=int(input())
S=[0]*10**6
goukei=0
for i in range(10**6):
    goukei+=i
    S[i]=goukei
    
for i in range(10**6):
    if X<=S[i]:
        print(i)
        exit()

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

Solution (Python):
import bisect
n = int(input())
sl = []
for i in range(1,100000):
	sl.append(i*(i-1)//2+1)
ans = bisect.bisect_right(sl, n)
print(ans)

Solution (Python):
n = int(input())
if (int((2*n)**(1/2))+1)*(int((2*n)**(1/2)))/2 < n:
    print(int((2*n)**(1/2))+1)
else:
    print(int((2*n)**(1/2)))

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

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

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

Solution (Python):
import math

x = int(input())
ans = math.ceil((2 * x) ** 0.5 - 0.5)
print(ans)

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

cnt = 0
for i in range(10**5):
    cnt += i
    if x <= cnt:
        print(i)
        break

Solution (Python):
print(round((2*int(input()))**.5))

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

n = 1

while n*(n+1)//2 < x:
  n += 1
print(n)

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

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

Solution (Python):
def main():
    X = int(input())
    for t in range(pow(10, 6)):
        s = (t*(t+1))//2
        if s >= X:
            print(t)
            break

if __name__ == "__main__":
    main()

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

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

Solution (Python):
X = int(input())
A = 0
B = 0
for i in range(1,10**5):
    if A < X:
        A+=i
    else:
        print(i-1)
        exit()

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    x=int(readline())

    l=0
    r=10**9
    while l<r-1:
        m=(l+r)//2
        if m*(m+1)//2>=x:
            r=m
        else:
            l=m

    print(r)

if __name__=="__main__":
    main()

Solution (Python):

def calculate(n):

    t = 1
    while True:
        s = ((1 + t) * t) // 2
        if s >= n:
            print(t)
            return t
        t = t + 1



calculate(int(input()))

Solution (Python):




x = int(input())

wkx = 0
idx = 0

while wkx < x:
    idx = idx + 1
    wkx = wkx + idx


print(idx)

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

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

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

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

Solution (Python):
X = int(input())
P = 0
i = 0
while X > P:
  i += 1
  P += i

print(i)

Solution (Python):
import numpy as np

X = int(input())
arr = np.arange(100000)
cumsum = arr.cumsum()

idx = np.searchsorted(cumsum, X)
print(idx)

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

print(ans)

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

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

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

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

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

if x==1:
    print(1)
    exit(0)

cnt=1
iterate=2
while cnt<x:
    cnt+=iterate

    if x<=cnt:
        break
    iterate+=1


print(iterate)

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

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

Solution (Python):
s = list(map(int, input().split()))
for i in range(1,s[0]+1):
    a=i*(i+1)/2
    if a>=s[0]:
        print(i)
        break

Solution (Python):
x = int(input())
k = 1
n = 0
while k <= x:
    n += 1
    k += n

print(n)

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

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

print(int(numpy.ceil( (-1+numpy.sqrt(1+8*x))/2 )))

Solution (Python):

import sys


def solve(X: int):
    t = 1
    while True:
        if t * (t + 1) // 2 >= X:
            print(t)
            return
        t += 1
    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())

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

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

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

Solution (Python):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *

from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction



mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]







X=l()[0]
i=1
while(X-i>0):
    X-=i
    i+=1

print(i)

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

ans = X
m = int(X ** .5)
t = m * (m + 1) // 2
while True:
  if X <= t:
    break
    
  m += 1
  t = m * (m + 1) // 2

print(m)

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

ans = 0
c = 1
while True:
    ans += c
    if ans >= n:
        print(c)
        exit()
    c+= 1

Solution (Python):

import sys
input = sys.stdin.readline









X = int(input())

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

Solution (Python):
X = int(input())
ans = (-1 + (1+8*X)**(1/2)) / 2
if ans % 1 <= 10**(-7):
    print(int(ans))
else:
    print(int(1 + ans//1))

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

Solution (Python):
def main():
    X = int(input())
    n = 1
    while True:
        if (n - 1) * n // 2 < X <= n * (n + 1) // 2:
            break
        n += 1
    print(n)


if __name__ == '__main__':
    main()

Solution (Python):
x = int(input())
sm=0
res=0
for i in range(1,x+1):
    sm = (i+1)*i/2
    if sm>=x:
        res=i
        break
if sm-x==res:
    print(res-1)
else:
    print(res)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7

x=I()
sm=0
for i in range(1,10**5):
    sm+=i
    if sm>=x:
        print(i)
        sys.exit()

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

if __name__ == '__main__':
    main()

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

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

for i in range(1, x+1):
    if i*(i+1) // 2 >= x:
        print(i)
        quit()

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

def f(n):
  return n*(n+1) // 2

for i in range(1, X+1):
  if f(i) >= X:
    print(i)
    quit()

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

def f(n):
  return n*(n+1) // 2

n = 0
for i in range(1, X+1):
  if f(i) >= X:
    n = i
    break

print(n)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np

X = INT()
i = int ((2*X)**0.5 - 1)

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np

X = INT()
i = int (X**0.5)

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np

X = INT()
ans = ceil((-1 + (1 + 8*X)**0.5)/2)
print(int(ans))