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):
import sys, re
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
from heapq import heappush, heappop

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()
i = int(X**(1/2))
while i*(i+1)//2 < X:
	i += 1
print(i)

Solution (Python):
def kangaru(x):
    count = 0
    i = 0
    while count < x:
        count += i
        i += 1






    return i - 1

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):

import sys
readline = sys.stdin.buffer.readline
n = int(readline())

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

Solution (Python):

n = int(input())

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

Solution (Python):

n = int(input())

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

Solution (Python):

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

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

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

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

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

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

    def get_time(target_x):
        x = 0

        for i in range(0, 10**9):
            x = x + i + 1
            if target_x <= x:
                return i + 1

    res = get_time(X)

    return res


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

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

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

Solution (Python):
a = int(input())
ans = 0
while a > 0:
  ans += 1
  a -= ans
print(ans)

Solution (Python):

X = int(input())

time = 0
acc = 0

while acc < X:
  time += 1
  acc += time

print(time)

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

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

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

print(ans)

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

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline


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

    ruiseki = 0
    ans = 0
    while ruiseki < N:
        ruiseki += ans
        ans += 1

    print(ans - 1)

    

if __name__ == '__main__':
    main()

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

def main():
    N = int(input())
    num = ((1+8*N)**(1/2)-1)/2
    print(math.ceil(num))

if __name__ == "__main__":
    main()

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

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

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

print(ans)

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

t = 0

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

print(t)

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

count = 0

if X == 1:
  print("1")
  quit()
if X == 2:
  print("2")
  quit()

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

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

print(t)

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

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

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

Solution (Python):

X = int(input())

ans = 0
x = 0

while x < X:
    ans += 1
    x += ans 
    
print(ans)

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

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

Solution (Python):
X=int(input())
XX=X*2
for n in range(XX):
    if XX<=n*(n+1):
        print(n)
        break

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

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

x = int(input())
w = 0
for i in range(1, 10**8):
    if x <= (i+1)*i//2:
        w = i
        break
print(w)

Solution (Python):
import sys
input = sys.stdin.readline
X = int(input())
sum = 0
count = 0
for i in range(1,X+1) :
    sum +=i
    if sum >= X :
        count = i
        break
print(min(X,count))

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

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

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


t = 1
s = 0
while True:
    s += t
    if s >= X:
        break

    t += 1

print(t)

Solution (Python):
import sys
input = sys.stdin.readline
x=int(input())
for i in range(10**6):
    if 2*x<=i**2+i:
        print(i)
        exit()

Solution (Python):
import math

x = int(input())

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

print(ans)

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

sum = 0
i = 0
while sum < X:
    i += 1
    sum += i

print(i)

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

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

Solution (Python):
N = int(input())
l, r = 0, 100000
while l + 1 < r:
  m = (l + r) // 2
  if m * (m + 1) // 2 < N:
    l = m
  else:
    r = m
print(r)

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

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

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

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

i = 1
sum_i = 0
count = 0
while sum_i < X:
    sum_i += i
    i += 1
    count += 1

print(count)

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

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

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

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

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

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

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

l = 0
ans = 0

for i in range(1, 10**9):
    l += i
    ans += 1
    if x <= l:
        print(ans)
        break

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

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

def check(mid):
    if (mid)*(mid-1)//2 >=X:
        return False
    else:
        return True

left = 0
right = 10**18
while (right-left) > 1:
    mid = (right+left)//2
    if check(mid):
        left = mid
    else:
        right = mid
if check(left):
    print(left)
else:
    print(right)

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

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

Solution (Python):
import math

X = int(input())
N = int(math.sqrt(2 * X)) + 1

def gauss(n):
    ans = int(n * (n + 1)/ 2)
    return(ans)

A = [gauss(i) for i in range(N + 1)]

ans = 0
for i in range(1, N + 1):
    if X == A[i]:
        ans = i
        break
    elif X > A[i - 1] and X < A[i]:
        ans = i
        break

print(ans)

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

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

while x > d:
    t += 1
    d += t
    ans += 1

print(ans)

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

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

Solution (Python):
"""
今回の移動方法は、全て右に進んだ場合{1, 2, 3, 4, 5, 6, …., t}となる。これは等差数列であり、
この数列の項の総和は等差数列の和の公式によってO(1)で求めることができる。
(t >= X)となる最小のｔが答えとなる。
"""

X = int(input())

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

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

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

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

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

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

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

ans = 0
while x > 0:
    ans += 1
    x -= ans

print(ans)

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

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

print(count)

Solution (Python):

import math
X = int(input())









n = math.ceil((-1 + math.sqrt(1 + 8*X) ) / 2)
print(n)

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

Solution (Python):
X = int(input())
sum = 0
t = 0
while sum < X:
    t += 1
    sum += t
print(t)

Solution (Python):
x=int(input())
r=(-1+(1+8*x)**0.5)/2
if r.is_integer():
  print(int(r))
else:
  print(int(r)+1)

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

i=0
wa=0

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

print(i)

Solution (Python):
import sys
input = sys.stdin.readline
X = int(input().rstrip())
i = 0
S = 0
while X > S:
    i += 1
    S += i
print(i)

Solution (Python):
import bisect
tri=[i*(i+1)//2 for i in range(10**5)]
print(bisect.bisect_left(tri,int(input())))

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf')
ans = 0 ;count = 0 ;pro = 1

x=int(input())
for i in range(1,10**9):
    count+=i
    if x<=count:
        print(i)
        exit()

Solution (Python):
x = int(input())
candidate = [1] * (10 ** 5 + 1)
ans = 0
for i in range(1, 10 ** 5 + 1):
    candidate[i] = candidate[i - 1] + i + 1
    if candidate[i] > 10 ** 9:
        break
for i in range(len(candidate)):
    if x <= candidate[i]:
        print(i + 1)
        exit()

Solution (Python):
import sys

x = int(sys.stdin.readline().rstrip())

def main():
    l = 0
    r = x + 1
    while l + 1 < r:
        m = (l + r) // 2
        if (1 + m) * m // 2 >= x:
            r = m
        else:
            l = m
    return r

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
from pprint import pprint
from copy import deepcopy
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
from pprint import pprint


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 100000000

x = I()
root = int((2 * x) ** 0.5)
if x * 2 <= root * (root + 1):
    print(root)
else:
    print(root + 1)

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

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

Solution (Python):
import sys
if sys.platform in ['ios', 'win32', 'darwin']:
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(x) for x in input().split()]

X = INT()


print(round((X*2)**0.5))

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

print(i)

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

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

print(i)

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

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

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

for k in range(10 ** 5):
    if k * (k + 1) // 2 >= x and (k-1) * k //2 < x:
        ans = k
        break
print(ans)

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

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    X = I()
    def solve(x):
        res = (-1+sqrt(1+8*x))/2
        return res + (int(res)!=res)
    print(int(solve(X)))
if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

Solution (Python):
from sys import stdin
import bisect

n = int(stdin.readline().rstrip())
i = 1
while True:
    if i*(i+1)//2 >= n:
        break
    else:
        i += 1
print(i)

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

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

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

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

Solution (Python):

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

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

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

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

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

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

up = X 
down = 0 
while up > down + 1:
    mid = (up + down) // 2
    if (mid + 1) * mid // 2 >= X:
        up = mid
    else:
        down = mid
print(up)

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

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

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

t = 0
r = 0
while r < x:
    t += 1
    r += t

print(t)

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

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

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    X = int(inputs[0])
    i = 1
    current = 0
    while current < X:
        current += i
        i += 1
    return i - 1


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):

X = int(input())

s = 0
i = 1
while s < X:
    s += i
    i += 1

print(i-1)

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

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

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

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

Solution (Python):
import itertools
from bisect import bisect_left
X=int(input())
x=[i for i in range(2*10**5)]
x=list(itertools.accumulate(x))
n=bisect_left(x,X)
print(n)

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

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

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

Solution (Python):
def examC():
    X = I()
    cur = int(0)
    i = 1
    while (X>cur):
        cur += i
        i +=1
    print(i-1)

import sys
import copy
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examC()

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

ans = 1
ad = 0
while True:
    if x <= ad:
        break
    ad += ans
    ans += 1

print(ans-1)

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

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

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

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

print(i-1)

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

Solution (Python):
x=int(input())
k=0
j=0
if x==1:
  print("1")
  exit()
elif x==2:
  print("2")
  exit()
else:
  for i in range(x):
    if j<x:
      j+=i
      k+=1
    else:
      print(k-1)
      exit()

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

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

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

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

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    from itertools import accumulate
    S = [i for i in accumulate(range(1, min(N+1, 44725)))]

    def is_ok(mid):
        if N <= S[mid]:
            return True
        else:
            return False

    def binary_search_meguru():
        left = -1
        right = len(S)
        while right - left > 1:
            mid = left + ((right - left) // 2)
            if is_ok(mid):
                right = mid
            else:
                left = mid
        return right

    ans = binary_search_meguru() + 1
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    from itertools import accumulate
    S = [i for i in accumulate(range(1, min(N+1, 100000)))]

    def is_ok(mid):
        if N <= S[mid]:
            return True
        else:
            return False

    def binary_search_meguru():
        left = -1
        right = len(S)
        while right - left > 1:
            mid = left + ((right - left) // 2)
            if is_ok(mid):
                right = mid
            else:
                left = mid
        return right

    ans = binary_search_meguru() + 1
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
from math import sqrt

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

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


if __name__ == "__main__":
    main()

Solution (Python):
from math import sqrt

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

    a = int(sqrt(2 * X))

    for i in range(0, 5):
        b = a + i
        if b * (1 + b) / 2 >= X:
            ans = b
            break

    print(ans)




if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import bisect
x = int(input())
xx = x//2
a = []
s = 0
for i in range(x+1):
	if (i * (i+1))/2 >= x:
		print(i)
		exit()

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

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

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

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

total=0
for i in range(1,10**10):
    total+=i
    if(total>=N):
        print(i)
        exit()

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

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

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

print(i-1)

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

n = int((2 * X)**0.5)
if n * (n + 1) >= 2 * X:
    ans = n
else:
    ans = n + 1

print(ans)

Solution (Python):
x = int(input())
'''
if x == 1:
    ans = 1
elif x == 2:
    ans = 2
elif x == 3:
    ans = 2
elif x == 4:
    ans = 3
elif x == 5:
    ans = 3
elif x == 6:
    ans = 3
elif x == 7:
    ans = 4
elif x == 8:
    ans = 4
elif x == 9:
    ans = 4
elif x == 10:
    ans = 4
11から15までは5
122333444455555...の群数列
'''
for i in range(1,x+1):
    if i*(i-1)/2 < x <= i*(i+1)/2:
        ans = i
        break
print(ans)

Solution (Python):

import sys


def solve(X: int):
    i=1
    sum_a=0
    while sum_a < X:
        sum_a+=i
        i+=1

    print(i-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())
k = 0
while True:
    k += 1
    if k*(k+1)//2+1 > x:
        break
print(k)

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

Solution (Python):
from operator import rshift


def main():
    X = int(input())
    ans = 1
    while rshift(ans ** 2 + ans, 1) < X:
        ans += 1
    print(ans)
    return


main()

Solution (Python):
from operator import rshift


def main():
    X = int(input())
    ans = 1
    while rshift(ans * (ans + 1), 1) < X:
        ans += 1
    print(ans)
    return


main()

Solution (Python):
def main():
    X = int(input())
    ans = 1
    while ans * (ans + 1) * 0.5 < X:
        ans += 1
    print(ans)
    return


main()

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


def main():
    X = int(input())
    print(math.ceil((-1 + math.sqrt(1+8*X))/2))


if __name__ == '__main__':
    main()

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


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


if __name__ == '__main__':
    main()

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


main()

Solution (Python):
def main():
    X = int(input())
    accum = 1
    ans = 1
    while accum < X:
        ans += 1
        accum += ans
    print(ans)
    return


main()

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

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

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

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

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

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

Solution (Python):
X=int(input())
Y=[0]*(10**5)
for i in range(10**5):
  if(i):
    Y[i]=Y[i-1]+i
ans=0
for i in range(10**5):
  if(X<=Y[i]):
    print(i)
    break

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7

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

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

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

i = 0
while True:
    if i * (i + 1) // 2 < X <= (i + 1) * (i + 2) // 2:
        i += 1
        break
    else:
        i += 1

print(i)

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

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

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

print(i)

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

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

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

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

print(t)

Solution (Python):
import math
X=int(input())
n=math.sqrt(X)//1
while n*(n+1)<2*X:
  n+=1
print(int(n))

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

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

Solution (Python):


X = int(input())



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

print(t)

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

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

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

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

ttl = 0
i = 1

while(ttl < n):
    ttl += i
    i += 1

print(i-1)

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




import bisect


















def main():
    X=int(input())
    li=[i*(i+1)//2 for i in range(10**5) if i*(i+1)//2<10**9]
    print(bisect.bisect_left(li,X))


if __name__ == '__main__':
    main()

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

Solution (Python):

X = int(input())

T = []
total = 0
idx = 0
ans = 0

while total < 2500000000:
    idx += 1
    total += idx
    T.append(total)

for i in range(len(T)-1):
    if i == 0:
        if X == T[i]:
            ans = i+1
            break
    if T[i-1]<X<=T[i]:
        ans = i+1
        break
print(ans)

Solution (Python):


X=int(input())

i=0
count=0
while True:
    i+=1
    count+=i
    if count>=X:
        print(i)
        exit()