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
for i in range(1,10**9):
  ans += i
  if ans >= x:
    print(i)
    break

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

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

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

Solution (Python):

"""
Created on Tue Sep 29 15:44:49 2020

@author: liang
"""

X = int(input())

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

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

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

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

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

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

  if x<now:
    print(i)
    break

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

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

Solution (Python):
X = int(input())
A = 0
for i in range(1, 100000):
  A += i
  if X <= A:
    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):
x = int(input())
ans = int((x * 2) ** 0.5)
while 1:
    if ans * (ans + 1) // 2 >= x:
        print(ans)
        break
    ans += 1

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

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

print(cnt)

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

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

print(i)

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

i=1
cum=[0]
while cum[-1] < 10**9:
    cum+=[cum[-1]+i]
    i+=1

import bisect
index = bisect.bisect_left(cum, x)

print(index)

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

i = 0

while True:
  tmp = int((i*(i+1))/2)
  if tmp >= x:
    print(i)
    exit()
  else:
    i += 1

Solution (Python):
from collections import deque,defaultdict,Counter
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from bisect import bisect_left,bisect_right
from math import sqrt,gcd,ceil,floor,factorial

from functools import reduce
from pprint import pprint
from statistics import mean,median,mode
import sys
sys.setrecursionlimit(10 ** 6)

INF = float('inf')
mod = 10**9 + 7

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse=False):
    data.sort(key=lambda x:x[col],reverse=revese)
    return data

def mymax(data):
    M = -1*float('inf')
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float('inf')
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def mydictvaluesort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[1] )

def mydictkeysort(dictionary):
    return sorted( dictionary.items(), key=lambda x:x[0] )

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(' ')
        elif type(ls[0])==str:
            print(' '.join(ls))
        elif type(ls[0])==int:
            print(' '.join(map(str,ls)))
        else:
            print('Output Error')
    else:
        if len(ls)==0:
            print('')
        elif type(ls[0])==str:
            print(''.join(ls))
        elif type(ls[0])==int:
            print(''.join(map(str,ls)))
        else:
            print('Output Error')

def I():
    return int(input())

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

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

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

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

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]








x = I()

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

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

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())
for i in range(1,10**5):
    if x<=(i*(i+1))//2:
        print(i)
        break

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

L = [0]
for i in range(1, 10 ** 5):
    L.append(L[i - 1] + i)

ans = 0
for i in range(1, X + 1):
    
    if L[i] >= X:
        ans = i
        break


print(ans)

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

l = 0
r = 10**9

while r-l>1:
    tmp = (l+r)//2
    if (tmp+1)*tmp//2 >= X:
        r = tmp
    else:
        l= tmp

print(r)

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

num=0
cnt=0

for i in range(1,10**9):
  num+=i
  cnt+=1
  if num>=x:
    break
    
print(cnt)

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

t = 0
Sum = 0
while Sum < X:
    t += 1
    Sum += t

print(t)

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

rest = x

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

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

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

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

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

print(i)

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

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

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

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

Solution (Python):
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): 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)
sys.setrecursionlimit(10 ** 6)
mod = 10**9+7
cnt = 1
ans = 0
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()

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

Solution (Python):
from math import floor
X = int(input())

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

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

Solution (Python):
x = int(input())
place = 0
i = 1

while 1:
    if place + i >= x:
        print(i)
        break
    else:
        place += i
        i += 1

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

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

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

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

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

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
INF = float('inf')


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

    N = ii()
    dist = 0

    for i in range(1, N + 1):
        dist += i
        if dist >= N:
            print(i)
            exit()


if __name__ == '__main__':
    main()

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

    answer = 0
    tmp = 0
    for i in range(10 ** 9):
        tmp += i
        if tmp >= x:
            answer = i
            break

    print(answer)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right 
from heapq import heapify, heappop, heappush
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)

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

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

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

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

Solution (Python):
i=1
import copy
X=int(input())
s=0
while True:
    s+=copy.copy(i)
    if s>=X:
        print(i)
        exit()
    i+=1

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





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

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

ub = 10**9
lb = 0

while ub - lb > 1:
    mid = (lb + ub) // 2
    if mid*(mid+1)//2 >= x:
        ub = mid
    else:
        lb = mid
print(ub)

Solution (Python):

def main():
    x = int(input())
    cnt = 0
    for i in range(x + 1):
        cnt += i
        if cnt >= x:
            print(i)
            exit()
        
if __name__ == '__main__':
    main()

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

import math as m

t = int(m.sqrt(X*2))
if t*(t+1)/2 < X:
  t += 1

print(t)

Solution (Python):
x = int(input())
ans = 0
k = 0
t = 0
while k < x:
  k = t * (t + 1) / 2
  t += 1
ans = t - 1
print(ans)

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

Solution (Python):
X = int(input())
cum = [0]*(10**5+10)
ans = None
for i in range(1, 10**5 + 1):
    cum[i] = cum[i-1] + i

for t in range(1, 10**5 + 1):
    if cum[t] >= X:
        ans = t
        break
print(ans)

Solution (Python):
X = int(input())
from itertools import count
for t in count(1,1):
    if (t-1)*t >= 2*(X-t):
        print(t); break

Solution (Python):
x = int(input())
reached, ans = 0, 0
while reached < x:
    reached += ans
    if reached >= x:
        break
    ans += 1
    
print(ans)

Solution (Python):
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

import string

def main():
    x = i_input()
    l = [0]
    for i in range(1,10**6):
        l.append(l[i-1]+i)

    for i,k in enumerate(l):
        if x <= k:
            print(i)
            exit()


if __name__=="__main__":
    main()

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

Solution (Python):
def get_index(n):
    i=1
    while True:
        if n<=piramid(i):
            return i-1
        i+=1

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

n=int(input())
index=get_index(n)

print(index+1)

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

print(solve())

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

cnt = 0
s = 0

for i in range(1, x+1):
    cnt += 1
    s += i
    if s >= x:
        break

print(cnt)

Solution (Python):

X = int(input())

sum_i = 0
for i in range(1,10**5):
    sum_i += i
    if sum_i >= X:
        ans = i
        break
print(ans)

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def main():
	x = int(input())
	
	
	s=0
	for i in range(mod):
		s+=i
		if s >= x:
			return i
	
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

Solution (Python):
def INT():
    return int(input())

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

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

X = INT()
i = 1
place = 0

while place < X:
    place += i
    i += 1

ans = i - 1
print(ans)

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

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

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

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

ans = 0

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

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

Solution (Python):
'''
Created on 2020/08/28

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  X=int(pin())
  i=1
  while i<=X:
    if i*(i+1)>=2*X:
      print(i)
      return 
    i+=1
  return 
main()

Solution (Python):
import bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    x = I()
    ans = 0
    cnt = 0

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

    print(ans)
    
main()

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

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

Solution (Python):
x=int(input())
sum,cnt=0,0
while sum<=10**9:
  cnt+=1
  if sum<x<=sum+cnt:
    print(cnt)
    break
  sum+=cnt

Solution (Python):
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq

x = ni()
tmp = 0
for i in range(1,10**9):
    tmp+=i
    if tmp>=x:
        break
print(i)

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

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

print(i)

Solution (Python):
X=int(input())
ct=1
sum=1
while X>sum:
  ct+=1
  sum+=ct
print(ct)

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

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

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

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

Solution (Python):
n=int(input())
ans = 0
Ans = 1

while ans < n:
    ans += Ans
    Ans += 1
print(Ans-1)

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

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




def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))



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




if __name__ == "__main__":
	main()

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

A = []
tmp = 0
for i in range(1, X+1):
    tmp += i
    A.append(tmp)
    if tmp >= X:
        print(i)
        break

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X = INT()

A = []
for i in range(1, 2 * (int(sqrt(X))+1)):
    a =  i * (i + 1) // 2
    
    if a <= X:
        A.append(a)
    else:
        ans = len(A)
        mi = A.pop()
        ma = a
        break


if mi == X:
    print(ans)
else:
    print(ans+1)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
from decimal import *
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

X = Decimal(INT())
print(((Decimal(-1)+(8*X).sqrt())/Decimal(2)).quantize(Decimal("0"), rounding=ROUND_CEILING))

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    X = INT()

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate, product 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)


mod = 998244353
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
x = I()
t = 0
while (t*(t+1))/2 < x:
    t += 1
print(t)

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

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


def binary_search(n) -> int:
    target = n * 2
    left, right = 0, target
    while right - left != 1:
        mid = (left + right) // 2
        if mid * mid + mid < target:
            left = mid
        elif mid * mid + mid > target:
            right = mid
        elif mid * mid + mid == target:
            return mid
    return right


print(binary_search(n))

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

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

for i in range(1,10**5):
    curr_max = i*(i+1)//2
    if curr_max >= x:
        print(i)
        break

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

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

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

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

Solution (Python):
import collections
target = int(raw_input())
t = 0
while(target):
	target -= min(target, t + 1)
	t +=1
print t

Solution (Python):
X = int(input())
def sum_num(x):
    A = [0]
    counter = 0
    for i in range(1,10**7):
        counter += i
        A.append(counter)
        if A[-2] <= x <= counter:
            return A

print(len(sum_num(X))-1)

Solution (Python):
X = int(input())
Cnt = 0
Sum = 0
while Sum<X:
    Cnt += 1
    Sum += Cnt
print(Cnt)

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

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

Solution (Python):
import sys
from math import ceil
def input(): return sys.stdin.readline().strip()

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


if __name__ == "__main__":
    main()

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

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

Solution (Python):





import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string
from decimal import *


BUFSIZE = 8192

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def main():
    x=int(input())
    ans=math.ceil((math.sqrt(8*x+1)-1)/2)
    print (ans)
if __name__ == "__main__":
    main()

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

y,i=1,1
while y<x:
  i+=1
  y+=i
print(i)

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

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

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

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

Solution (Python):
import sys


stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    x = ni()
    d = 0
    for i in range(1, x + 1):
        d += i
        if d >= x:
            print(i)
            return


if __name__ == '__main__':
    main()

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

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

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

while i <= X:
  c = (i*(i+1)) / 2
  if c >= X:
    print(i)
    break
  i += 1

Solution (Python):
import math

def goukei(n):
    return int(n*(n+1)/2)

x = int(input())
tmp = int(math.sqrt(2 * x))

while goukei(tmp)<x:
    tmp += 1

print(tmp)

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

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

print(t)

Solution (Python):
def cin():
    in_ = list(map(int,input().split()))
    if len(in_) == 1:  return in_[0]
    else:  return in_

X = cin()
cnt = 0
i = 0
while(i < X):
    cnt += 1
    i += cnt
print(cnt)

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

number=0
for n in range(1,pow(10,8)):
    number+=n
    if number>=X:
        break
print(n)

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

ok = x
ng = -1
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())
SUM=0
for i in range(1,10**6):
  SUM += i
  if SUM >= X:
    print(i)
    exit()

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

if not ( 1 <= X <= 10**9 ): sys.exit()
res=0
count=0
for I in range(1,X+1):
    count += 1
    res += count
    if res >= X:
        print(count)
        sys.exit()

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

time = 0
pos = 0
while pos < X:
    time += 1
    pos += time

print(time)

Solution (Python):
import math
X = int(input())
ruto = math.ceil(math.sqrt(2*X))+1
kari = ruto**2+ruto
ans=1
for i in range(ruto-1, 0, -1):
    if i**2+i < 2*X:
        ans = i+1
        break
    kari = i**2+i
print(ans)

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

cur = 0
for i in range(0, 45000):
    cur += i
    if x <= cur:
        print(i)
        break

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

if X in (1, 2):
    print(X)
    exit()

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

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 sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy
 

 










 
X=int(input())

tmp = 0

for i in range(1,X+1):
    tmp = tmp+i
    if X <= tmp:
        print(i)
        sys.exit()

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


x = int(input())
k = 0
while k*(k+1)//2 < x:
    k += 1
ans = k
print(ans)

Solution (Python):
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

x = inint()

ans = 0

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

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

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

Solution (Python):
import math

x = int(input())

y = int(math.sqrt(2*x))
for i in range(y+1, 0, -1):
    if i * (i + 1) < 2 * x:
        print(i + 1)
        break

if x == 1:
    print(1)

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

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

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