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())
ans = 0
def f(n):return((n* (n+1))//2)
while f(ans) < x:
    ans += 1
print(ans)

Solution (Python):
from bisect import bisect_left
def main():
        x=int(input())
        l,h=0,x
        ans=-1
        while(l<=h):
            m=(l+h)//2
            if(m*(m+1)//2<x):
                l=m+1
            else:
                h=m-1
                ans=m
        print(ans)
main()

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

n = int((2*x)**0.5)

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

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

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

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

dammy=1
t=1
while True:
    
    if dammy>=X:
        break
    else:
        dammy+=(t+1)
        t+=1

print(t)

Solution (Python):
X = int(input())
a,k = 0,0
while k < X:
    k = a*(a+1)//2
    a+=1
print(a-1)

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

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

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

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

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

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

now = 0
cnt = 1

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

print(cnt-1)

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

Solution (Python):


import sys
read = sys.stdin.read
readline = sys.stdin.readline

x, = map(int,read().split())

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

print(i)

Solution (Python):
if __name__ == '__main__':
    n = int (input())

    count =0
    ans = 0

    for i in range(1,n+1):
        count+=i
        ans +=1
        if n <= count:
            print(ans)
            break

Solution (Python):
import sys

X = int(input())
a = 1
cnt = 0

if X == 1:
  print("1")
else:
  while a < X:
    a=int(cnt*(cnt+1)/2)
    cnt = cnt+1
  print(cnt-1)

Solution (Python):
from math import*

n=int(input())
x1=(-1+sqrt(1+8*n))//2
x2=(-1-sqrt(1+8*n))//2
ans=int(max(x1,x2))
if (ans*(ans+1))//2==n:
	print(ans)
else:
	print(ans+1)

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

Solution (Python):
x=int(input())
sum=0
for i in range(1000000):
  sum+=i
  if x<=sum:
    print(i)
    break
  else:
    pass

Solution (Python):
import math
import sys
import resource
n = int(input());
dp = []
def dfs(x, i) :
  dp[i] = dp[i-1] + i
  
  if dp[i] >= n : 
    return i
  return dfs(dp[i], i+1)

sys.setrecursionlimit(100000)

sz = 100000
dp = [0] * sz
print(dfs(0, 1))

Solution (Python):
x = int(input())
i = 1
while (1):
    x -= i
    if x < 1:
        print(i)
        exit()
    else:
        i += 1

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

i=1
t=1
cnt=1
while t<x:
    i+=1
    t+=i
    cnt+=1
print(cnt)

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

for t in range(x + 1):
    if t * (t + 1) >= 2 * x:
        print(t)
        break

Solution (Python):
a = int(input())
i = 0
j = 1
count = 0
while True:
    i += j
    count += 1
    if i >= a:
        print(count)
        break
    j += 1

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

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

Solution (Python):

import sys


def solve(X: int):
    s = 0
    for i in range(1, X+1):
        s += i
        if s >= 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()
    X = int(next(tokens))  
    solve(X)

if __name__ == '__main__':
    main()

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())

i = 1

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

print(i)

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

Solution (Python):
import sys
import math
import string
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
from bisect import bisect, bisect_left, bisect_right

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

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

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

ok = x
ng = 0

while ok - ng > 1:
    mid = (ok + ng) // 2
    if mid * (mid + 1) // 2 >= x:
        ok = mid
    else:
        ng = mid

print(ok)

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

Solution (Python):
x=int(input())
ng=0
ok=10**9
while ok-ng>1:
    mid=(ok+ng)//2
    if mid*(mid+1)>=2*x:
        ok=mid
    else:
        ng=mid
print(ok)

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

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

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

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

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

Solution (Python):
import sys
import math
from collections import deque
X = int(input())
sum = 0
for i in range(1, 10**9):
    sum += i
    if sum >= X:
        print(i)
        break

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

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

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

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

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

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

Solution (Python):





x = int(input())
x = abs(x)
ans = 0
sum = 0
i = 0

while sum + i < x:
    sum += i
    i += 1
print(i)

Solution (Python):
n = int(input())
import sys
if n == 1:
    print(1)
    sys.exit()
for i in range(1,n**2):
    if round(i*(i+1)/2) >= n:
        print(i)
        sys.exit()

Solution (Python):
import sys
import os
if sys.platform=="darwin":
	base = os.path.dirname(os.path.abspath(__file__))
	name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
	
	sys.stdin = open(name)

x = int(input())
chk = 0
i = 1

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

print(i-1)

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

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

X = int(read())

def test(x):
    return x * (x + 1) // 2 >= X

left = 0 
right = X + 10
while left + 1 < right:
    x = (left + right) // 2
    if test(x):
        right = x
    else:
        left = x

answer = right
print(answer)

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

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

ans = 0
Init = int(sqrt(2*X)) + 1
for N in xrange(X+1):
    if (N+1) * N >= 2 * X:
        ans = N
        break
    
print ans

Solution (Python):

x = int(input())

position = 0
times = 1

while position < x:
    position += times
    times += 1

print(times - 1)

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

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

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

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

Solution (Python):
x=int(input())
low=1
high=10**5
while low<high:
    mid=(low+high)//2
    su=(mid*(mid+1))//2
    if su>=x:
        high=mid
    else:
        low=mid+1
print(low)

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

a = 0

for i in range(x+1):
    d = (i*(i+1))//2
    if(d>=x):
        a = i
        break

print(a)

Solution (Python):
import sys, math

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

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

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

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

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

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

print(ans)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    x = int(input().rstrip('\n'))
    t = 0
    cnt = 0
    for i in range(1, 10 ** 10):
        cnt += 1
        t += i
        if t >= x:
            print(cnt)
            exit()


if __name__ == '__main__':
    slove()

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

t = (-1 + math.sqrt(1 + 8 * x))
if t % 2 == 0:
  print(int(t)//2)
else:
  print(int(t)//2+1)

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

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

Solution (Python):
print(int((8*int(input()))**.5+1)//2)

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

Solution (Python):
import bisect as b
x=int(input())
a=[i*(i+1)//2 for i in range(1,100000)]
print(b.bisect_left(a,x)+1)

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

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

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

print(i)

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

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

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

Solution (Python):


x=int(input())
acc=0
ans=0
i=1
while x>acc: 
    acc+=i
    ans=i
    i+=1
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())

tmp = 0
for i in range(10**7):
    tmp += i
    if tmp >= X:
        print(i)
        break

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

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

cnt = 1
temp = 0
while True:
    temp += cnt
    if x <= temp:
        print(cnt)
        exit()
    cnt += 1

Solution (Python):



X = int(input())
i = 1
ctr = 0

while True:
    ctr += i
    if X <= ctr:
        print(i)
        exit()
    i += 1

Solution (Python):

import sys
def input(): return sys.stdin.readline().rstrip()
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
import heapq
INF = float("inf")
MOD = 10**9 + 7
sys.setrecursionlimit(10**7)

dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W
def mi(): return map(int, input().split())
def ii(): return int(input())



X = ii()

for t in range(1, 1000000):
  if (t**2 + t) // 2 >= X:
    print(t)
    exit()

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

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

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

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

total = 0
i = 0
ans = 0
while True:
    i += 1
    total += i
    ans += 1
    if X <= total:
        break

print(ans)

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

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

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

Solution (Python):
x=int(input())
k=(-1+(1+8*x)**(1/2))/2
if k%1==0:
    print(int(k))
else:
    print(int(k+1))

Solution (Python):

from math import ceil


def main():
    x = int(input())
    print(ceil((-1 + (8 * x + 1) ** 0.5) / 2))


if __name__ == "__main__":
    main()

Solution (Python):
from math import ceil, sqrt

X = int(input())
n = ceil((-1 + sqrt(1+ 8*X)) / 2)
print(n)

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

Solution (Python):

x = int(input())
for i in range(1, x + 1):
    if i * (i + 1) * 0.5 >= x:
        print(i)
        break

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

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

Solution (Python):
n=int(input())
tmp=0
for i in range(100000):
  tmp+=i
  if tmp>=n:
    print(i)
    break

Solution (Python):
import math
x = int(input())
k = 0
t = 0

if (math.sqrt(8 * x + 1) == math.floor(math.sqrt(8 * x + 1))):
  a = (-1 + math.sqrt(1 + 8 * x))/2
  print(int(a))
else:
  x = (-1 + math.sqrt(1 + 8 * x))//2
  print(int(x) + 1)

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

l = 0
for i in range(X):
    l += (i + 1)
    if l >= X:
        ans = i + 1
        break

print(ans)

Solution (Python):
n=int(input())
ans=1
m=1
while m<n:
  ans+=1
  m+=ans
print(ans)

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

Solution (Python):
X = input()
res = 0
for i in range(10 ** 5):
  if res + i > X:
    break
  res += i
if X == res:
  print i - 1
else:
  print i

Solution (Python):
import math

X = int(input())
print(math.ceil((-1+(8*X+1)**0.5)/2))

Solution (Python):
X=int(input())
print([t for t in range(10**5) if t*(t+1)/2<X][-1]+1)

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

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

Solution (Python):
def fun():
     print('ac')
     print('ac')
     print('ac')
     print('ac')
from math import*
n=eval(input())
s=ceil((-1+sqrt(1+8*n))/2)
print(s)

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

ans = 0
pos = 0
while pos < X:
    ans += 1
    pos += ans
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):
a=int(input())
for i in range(a):
    if i*(i+1)//2<=a and a<=(i+1)*(i+2)//2:
        print(i+1)
        break

Solution (Python):
n = int(input())
for t in range(10**9):
    n-= t
    if n<=0: print(t); break

Solution (Python):
a = int(input())
ar = []
count = 0
i = 1
while True:
    count += i
    ar.append(i)
    if count >= a:
        break
    i += 1
print(ar[len(ar)-1])

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

Solution (Python):
N=int(input())
a=0
i=0
while a<N:
  i+=1
  a+=i
print(i)

Solution (Python):
x = int(input())
import math
huga = int((-1 + math.sqrt(1+8*x))/2)

if huga*(huga+1) == 2*x:
    print(huga)
else:
    print(huga+1)

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

for t in range(10**5):
    if t*(t+1)/2 >= N:
        print(t)
        break

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

Solution (Python):
from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import *
from bisect import *

def read():
  return int(input())
 
def reads():
  return [int(x) for x in input().split()]

X = read()
ans = next(n for n in count(0) if n * (n+1) // 2 >= X)
print(ans)

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

t = 0
x = 0

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

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

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

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

x = 0
i = 0

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

print(i)

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

Solution (Python):
import math
X = int(input())
low_N = (-1 + (1 + 8 * X)**0.5) / 2
high_N = (1 + (1 + 8 * X)**0.5) / 2
if low_N % 1 == 0:
    print(int(low_N))
else:
    print(math.floor(high_N))

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

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

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

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

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

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

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

Solution (Python):
n=int(input())
for i in range(1,100000000):
    n-=i
    if n<=0:
        print(i)
        break

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

Solution (Python):

def inpl(): return list(map(int, input().split()))
from math import ceil

X = int(input())
print(ceil((2*X+1/4)**(1/2) - 1/2))

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

max = 0
i = 0

while max < nest:
	i += 1
	max += i

print(i)

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

Solution (Python):
def solution():
	a = raw_input()

	a = int(a)

	i = 0		

	b = 0

	while b < a:
		i += 1
		b += i
	print i

solution()

Solution (Python):
n = int(raw_input())
c = int((-1 + (1 + 8*n)**0.5)/2)
while c * (c+1) < n * 2:
    c += 1
print c

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

max = 0
i = 0

while max < nest:
	i += 1
	max += i

print(i)

Solution (Python):
def solve_slow(X):
    for n in range(1000000):
        
        if (n * (n - 1) // 2) >= X:
            break
    return n - 1


def solve_fast(X):
    
    
    n = max(int((1 + (1 + 8 * X) ** 0.5) / 2) - 1, 0)
    while True:
        if (n * (n - 1) // 2) >= X:
            break
        n += 1
    return n - 1


X = int(input())
print(solve_fast(X))

Solution (Python):

X = int(input())









n = max(int((1 + (1 + 8 * X) ** 0.5) / 2) - 1, 0)
while True:
    if (n * (n - 1) // 2) >= X:
        break
    n += 1
print(n - 1)

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

for n in range(1000000):
    
    if (n * (n - 1) // 2) >= X:
        break
print(n - 1)

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

Solution (Python):
n = int(input())
i, sum = 0, 0
while True:
    i += 1
    sum += i
    if sum >= n:
        print(i)
        break

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

Solution (Python):
from math import ceil, sqrt

x = int(input())
print(ceil((-1 + sqrt(8 * x + 1)) / 2))

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

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

Solution (Python):



def readln():
    _res = list(map(int,str(input()).split(' ')))
    return _res

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

Solution (Python):
X = int(input())
previous = 0 
for i in range(100000):
    previous += i 
    if X <= previous:
        print(i)
        break

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

m = 0

for i in range(1, x + 1):
    m += i
    if x <= m:
        print(i)
        break

Solution (Python):


x = int(input())

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

Solution (Python):
import math

str = input()
x = int(str)

res = math.ceil((-1 + math.sqrt(1 + 8 * x)) / 2.0)

print(res)

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

from math import sqrt
result = int(sqrt(x))

while x > (((result + 1 ) * result ) / 2):
  result += 1

print(result)

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

res = 1
s = 0
for i in range(1, 10 ** 5):
  s = s + i
  if s >= x:
    res = i
    break

print(res)

Solution (Python):
n = int(raw_input())
x = 0

for i in xrange(1, 100000):
	x += i
	if x >= n:
		print(i)
		break

Solution (Python):
import math

length=input()
print int(math.ceil((math.sqrt(1+8*length)-1)/2))

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

cin = sys.stdin


X = int(cin.readline())
'''
i(i+1)/2<=X
i**2 + i - 2X <=0
  -1 +- sqrt( 1 - 4 * (-2X))
  ------
  2
'''
i = ceil((-1+sqrt(1+8*X))/2)


print(i)

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()


def main():
    x = II()
    for i in range(10**5):
        if (i+1)*i/2 >= x:
            return i
    return -1


print(main())

Solution (Python):


import math

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

Solution (Python):
def cal(n): return n*(n+1)//2
 
x=int(input())
ans=[1,cal(x)]
a=0
while 1:
    a+=1
    tmp=cal(sum(ans)//2)
    if tmp>x:
        ans[1]=sum(ans)//2
    elif tmp<x:
        ans[0]=sum(ans)//2
    elif tmp==x:
        print(sum(ans)//2)
        break
    if ans[1]-ans[0]==1:
        print(ans[1])
        break

Solution (Python):

num = int(input())





ans = 0
sum_num = 0

if num == 1:
    print(1)
else:
    while True:
        ans += 1
        sum_num += ans
        if sum_num < num <= (sum_num + ans + 1):
            break

    print(ans + 1)

Solution (Python):
x=int(raw_input())
ans=0
su=0
while su<x:
    ans+=1
    su+=ans
print ans

Solution (Python):
import sys 
import math
home = int(sys.stdin.readline())

edge = int(math.sqrt(home*2)) +1
try_one = (edge * (edge+1)) /2
try_two = (edge * (edge-1)) /2
if try_two >= home:
    print edge -1
else:
    print edge

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

Solution (Python):
from sys import stdin
import math
n = int(stdin.readline())
cur = 0
st = 1
while cur <=n:
    cur += st
    if cur >=n:
        break
    st += 1
    
print st

Solution (Python):
from math import sqrt

x = int(input())
n = int(sqrt(2 * x)) - 10
while not (n - 1) * n // 2 < x <= n * (n + 1) // 2:
    n += 1
print(n)

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

Solution (Python):
def cal(n): return n*(n+1)//2

x=int(input())
ans=[1,cal(x)]
a=0
while 1:
    a+=1
    tmp=cal(sum(ans)//2)
    if tmp>x:
        ans[1]=sum(ans)//2
    elif tmp<x:
        ans[0]=sum(ans)//2
    elif tmp==x:
        print(sum(ans)//2)
        break
    if ans[1]-ans[0]==1:
        print(ans[1])
        break

Solution (Python):
x = int(raw_input())
n = 0
c = 0
while n < x:
    c += 1
    n += c

print c

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

Solution (Python):
import itertools
def f(t):
    return t * (t + 1) // 2
X = int(input())

def solve():
    for t in itertools.count(0):
        if X <= f(t):
            return t
print(solve())

Solution (Python):
import math

if __name__=="__main__":
    m = int(input())
    n = math.ceil((math.sqrt(1.0+8*m) -1)/2.0)
    print(n)

Solution (Python):
x = input()
i = 0
n = 0
while n<x:
    n = 0.5*i*(i+1)
    i += 1
print i-1

Solution (Python):
from sys import stdin
rr = lambda: stdin.readline().strip()
rrI = lambda: int(rr())
rrM = lambda: map(int, rr().split())

X = rrI()
def solve(X):
    i = 0
    a = X
    while a > 0:
        i += 1
        a -= i
    return i
print solve(X)

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

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

Solution (Python):

def getLnInputs():
    return input().split()


def getLnIntInputs():
    return list(map(int, getLnInputs()))


def main():
    X = getLnIntInputs()[0]
    counter = 0
    displacement = 0
    while displacement < X:
        counter += 1
        displacement += counter

    print(counter)
    return


main()

Solution (Python):
def triangle(x):
  n = int(((8*x-1)**0.5-1)/2)
  while n*(n+1) < 2*x: n += 1
  return  n
  
x = int(input())
n = triangle(x)
print(n)

Solution (Python):
X=int(input())
place=0
time=0
while place<X:
	time+=1
	place+=time
print(time)

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

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

print(i)

Solution (Python):
x = int(input())
s = 0
i = 1
while True:
    s += i
    if x <= s:
        print(i)
        break
    else:
        i += 1

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

mina = 0
maxa = 1000000000
mid = int((mina+maxa)/2)
for i in range(100):
    if mid*(mid+1)/2 < X:
        mina = mid
    else:
        maxa = mid
    mid = int((mina+maxa)/2)

print(mid+1)

Solution (Python):
import itertools 
X = int(input())
su = 0
for i in itertools.count(1):
    su += i
    if X <= su:
        print(i)
        break

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

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

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

print(i)

Solution (Python):


x = int(input())

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

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

import math
n = int(math.ceil((-1 + math.sqrt(1 + 8 * x)) / 2.0))
print(n)

Solution (Python):



def rl(s): return xrange(len(s))


INF = 2147483647


import sys
stdin = sys.stdin

X =        int( stdin.readline().strip() )

start = int((2*X)**0.5)

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

while triangular(start) > X:
    start -= 1

while triangular(start) < X:
    start += 1

print start

Solution (Python):

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys

def s():
    return raw_input().strip()
def n():
    return int(raw_input())
def d():
    return float(raw_input())

def ls():
    return raw_input().strip().split()
def ln():
    return map(int, raw_input().strip().split())
def ld():
    return map(float, raw_input().strip().split())

def fs():
    return [raw_input().strip() for i in xrange(input())]
def fn():
    return [int(raw_input().strip()) for i in xrange(input())]
def fd():
    return [float(raw_input().strip()) for i in xrange(input())]

MOD = 10**9 + 7

X = n()

s = int(math.sqrt(2 * X))

for i in xrange(max(0, s - 200), s + 3000):
    if i**2 + i >= 2 * X:
        print i
        break

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

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

n = 1
s = 0
while True:
    s += n
    if s >= X:
        print(n)
        break
    else:
        n += 1

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

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

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