Harryxun/stf_run huggingface dataset:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,x = readInts()
L = readInts()
cnt = 0
now = 0
while now <= x:
    cnt += 1
    now += L[cnt-1]
print(cnt)


### FIXED CODE ###

n, x = map(int, input().split())
l = list(map(int, input().split())) + [0] 
d = 0
cnt = 0

for i in range(n + 1):# 0 - n indexed
    if d <= x: cnt += 1
    d = d + l[i]

print(cnt)
a, b = input()
if a < b:
  print(unsafe)
else:
  print(safe)

### FIXED CODE ###

s = input()
l = [int(item) for item in s.split()]
if l[0] <= l[1]:
  print('unsafe')
else:
  print('safe')
import math

n,a,b=map(int,input().split())
st="b"*a+"r"*b

num=math.floor(n/(a+b))
s=st*num

for i in range(n-len(s)):
  if i<=a:
    s+="b"
  else:
    s+="r"
    
print(s.count("b"))

### FIXED CODE ###

n,a,b=map(int,input().split())

ab=a+b
num=n//ab
n-=ab*num

if n>=a:
  ans=a
  
else:
  ans=n
  
print(ans+num*a)
a, b = int(input())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")

### FIXED CODE ###

a, b = map(int, input().split())
if a*b % 2 == 0:
    print("Even")
else:
    print("Odd")
import itertools
N,M = map(int,input().split())
L=[]
for i in range(M):
    a,b=map(int,input().split())
    L.append([a,b])
 
number=[]
for i in range(1,N+1):
    number.append(i)
    
ans=0
 
for v in itertools.permutations(number,N):
    a=0
    v=list(v)
    for j in range(N-1):
        if ([v[j],v[j+1]] not in L ) and ([v[j+1],v[j]] not in L):
            a=1
    if a==0 and v[0]==1:
        ans+=1
 
print(ans)

### FIXED CODE ###

alice, bob = map(int, input().split())
if alice == 1 and bob != 1:
    print('Alice')
elif alice != 1 and bob == 1:
    print('Bob')
elif alice == bob:
    print('Draw')
else:
    if alice < bob:
        print('Bob')
    else:
        print('Alice')
n = int(input())
a = [int(input()) for _ in range(n)]

b = 0
cnt = 0
while cnt <= 100000:
  b = a[b]
  cnt += 1
  if b == 1:
    break
  
if cnt > 100000:
  print(-1)
else:
  print(cnt)

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]

b = 1
cnt = 0
while cnt <= 100000:
  b = a[b-1]
  cnt += 1
  if b == 2:
    break
  
if cnt > 100000:
  print(-1)
else:
  print(cnt)
def main():
  import sys
  input = sys.stdin.readline
  s=list(input())
  count1,count2,l=0,0,len(s)
  for i in range(l):
    count1=count1+1 if (i%2==0 and int(s[i])==1) or (i%2==1 and int(s[i])==0) else count1
    count2=count2+1 if (i%2==1 and int(s[i])==1) or (i%2==0 and int(s[i])==0) else count2
  print(min(count1,count2))

if __name__=='__main__':
  main()

### FIXED CODE ###

def main():
  s=list(input())
  count1,count2,l=0,0,len(s)
  for i in range(l):
    count1=count1+1 if (i%2==0 and int(s[i])==1) or (i%2==1 and int(s[i])==0) else count1
    count2=count2+1 if (i%2==1 and int(s[i])==1) or (i%2==0 and int(s[i])==0) else count2
  print(min(count1,count2))

if __name__=='__main__':
  main()
N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)


### FIXED CODE ###

N = int(input())
S = str(input())

cnt = 0

for i in range(0,len(S)-2):
  if S[i]  == 'A' and  S[i+1] == 'B' and S[i+2] == 'C':
   cnt += 1


print(cnt)
from heapq import heappush, heappop

N, M = map(int, input().split())
AB = [[] for _ in range(M+1)]
for _ in range(N):
  a, b = map(int, input().split())
  AB[a].append(b) # 消化日数に対しての価値
  
#heapq.heapify(a)  # listを優先度付きキューに

q = []
ans = 0
for B in AB:
  for b in B: # 日数：価値
    heappush(q, -b) # 最大値のため、マイナスをかける
  if q:
    ans -= heappop(q) # マイナスの値を戻す
print(ans)    
    


### FIXED CODE ###

from heapq import heappush, heappushpop

N, M = map(int, input().split())
tasks = [[] for _ in range(M+1)]
for _ in range(N):
  a, b = map(int, input().split())
  if a <= M:
    tasks[M-a].append(b)

q = []
for day in range(M+1):
  for v in tasks[day]:
    if len(q) < day+1:
      heappush(q, v)
    else:
      heappushpop(q,v)
print(sum(q))
n = input()

res = (n-(n/2))/n

print(res)

### FIXED CODE ###

import math
n = int(input())

if n == 1:
    print("{:.10f}".format(1))
    exit()

res = (n-math.floor(n/2))/n


print("{:.10f}".format(res))
A,B,C=map(int, input().split())
print('bust' if A+B+C => 22 else 'win')

### FIXED CODE ###

A,B,C=map(int, input().split())
print('bust' if A+B+C >= 22 else 'win')
import numpy as np
import sys
n,m = map(int,input().split())
list_a = list(map(int,input().split()))
#b_list = list(map(int,input().split()))
#print(" ".join(map(str,c_list)))
list_a.sort(reverse = True)
a_max = list_a[0] // 2
list_a[0] = a_max
count = 1
if m == 1:
    print(sum(list_a))
    sys.exit()
for i in range(m-1):
    if list_a[np.argmax(list_a[0:count])] < list_a[count]:
        #print(list_a[np.argmax(list_a[0:count])],list_a[count])
        list_a[count] = list_a[count] // 2 
        count += 1
    else:
        list_a[np.argmax(list_a[0:count])] = list_a[np.argmax(list_a[0:count])] // 2
        #print(list_a[np.argmax(list_a[0:count])])
print(sum(list_a))
"""
for i in range(m):
    count = 0
    while count == 0:

        for j in range(n):
            
            if list_a[j] > a_max:
                list_a[j] = list_a[j]//2
                a_max = a_max//2
                count = 1 
                print("c=1")
                print(a_max)
                print(list_a)
                break
        if count == 0:
            a_max -= 1
            print("c=0")
    
print(list_a)
"""

### FIXED CODE ###

import sys
n,m = map(int,input().split())
lst_a = list(map(int,input().split()))
temp = 0
cnt = 0
fin = 0
loop = 0
debug = 0
temp2 = 0
if n == 1:
    for i in range(m):
        lst_a[0] //= 2
    print(lst_a[0])
    sys.exit()
while debug < 10:
    loop = 0
    #temp2 = temp
    temp = 0
    lst_a.sort(reverse=True)
    while loop < n-1:
        lst_a[loop] //= 2
        cnt += 1
        temp = max(temp,lst_a[loop])
        if cnt == m:
            #print(lst_a)
            print(sum(lst_a))
            sys.exit()
        if temp > max(lst_a[loop],lst_a[loop + 1]):
            break
        if lst_a[loop + 1] > lst_a[loop]:
            loop += 1
        
        
        
"""        if lst_a[loop] >= max(lst_a[loop + 1],temp):
            lst_a[loop] //= 2
            temp = max(lst_a[loop],lst_a[loop+1])
            cnt += 1
            if cnt == m:
                print(sum(lst_a))
                sys.exit()
            if temp > lst_a[loop + 1]:
                break
            
            
        loop += 1
    
    #debug += 1
print(lst_a[99999])
# print(temp)
# print(cnt)
# print(lst_a)
# print(sum(lst_a))
"""
a = int(input()
b = int(input())
h = int(input())
print( (a+b)*h//2 )

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())
print( (a+b)*h//2 )
from collections import Counter

S = str(input())

memo = [0]
d = 0
mod = 2019


for s in S[::-1]:
    tmp = int(s) * pow(10, d, mod) % mod
    tmp = memo[-1] + tmp
    memo.appemd(tmp%mod)
    d += 1

c = Counter(memo)
ans = sum(v * (v-1)/2 for v in c.values())
print(ans)



### FIXED CODE ###

from collections import Counter

S = str(input())

memo = [0]
d = 0
mod = 2019


for s in S[::-1]:
    tmp = int(s) * pow(10, d, mod) % mod
    tmp = memo[-1] + tmp
    memo.append(tmp%mod)
    d += 1

c = Counter(memo)
ans = sum(v * (v-1)/2 for v in c.values())
print(int(ans))
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 heapq import heapify, heappop, heappush

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

def dijkstra(E, start):
    N_d = len(E)
    dist = [INF] * N_d
    dist[start] = 0
    q = [(0, start)]
    while q:
        dist_v, v = heappop(q)
        if dist[v] != dist_v:
            continue
        for u, dist_vu in E[v]:
            dist_u = dist_v + dist_vu
            if dist_u < dist[u]:
                dist[u] = dist_u
                heappush(q, (dist_u, u))
    return dist


N, M = MAP()
L = [LIST() for i in range(M)]
graph = defaultdict(list)

for a, b in L:
    graph[a-1].append((b-1, 1))
    graph[b-1].append((a-1, 1))

ans = 0

for i in range(M):
    a, b = L[i]
    E = deepcopy(graph)
    E[a-1].remove((b-1, 1))
    E[b-1].remove((a-1, 1))
    dist = dijkstra(E, i)
    if dist.count(INF) > 0:
        ans += 1

print(ans)



### FIXED CODE ###

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 heapq import heappop, heapify, heappush

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

N, M = MAP()
L = [LIST() for i in range(M)]

graph = defaultdict(list)

def dijkstra(E, start):
    N_d = len(E)
    dist = [INF] * N_d
    dist[start] = 0
    q = [(0, start)]
    while q:
        dist_v, v = heappop(q)
        if dist[v] != dist_v:
            continue
        for u, dist_vu in E[v]:
            dist_u = dist_v + dist_vu
            if dist_u < dist[u]:
                dist[u] = dist_u
                heappush(q, (dist_u, u))
    return dist


for a, b in L:
    graph[a-1].append((b-1, 1))
    graph[b-1].append((a-1, 1))

ans = 0
for a, b in L:
    E = deepcopy(graph)
    E[a-1].remove((b-1, 1))
    d = dijkstra(E, a-1)
    if d[b-1] == INF:
        ans += 1
print(ans)
# input
N, M = int(input())
X = list(map(int, input().split()))

X.sort()
K = [
    abs(X[i] - X[i - 1])
    for i in range(1, N)
]

print(sum(K[:M - (N - 1)]))

### FIXED CODE ###

# input
N, M = map(int, input().split())
X = list(map(int, input().split()))

X.sort()
K = sorted(
    [
        abs(X[i] - X[i - 1])
        for i in range(1, M)
    ],
    reverse=True
)

print(sum(K[N - 1:]))
input_lines = input()
input_i = input_lines.sprit()

print(input_i[0]*input_[1])
print(input_i[0]*2 + input_[1]*2)

### FIXED CODE ###

input_lines = input()
input_i = input_lines.split(" ")
print(int(input_i[0])*int(input_i[1]),end=" ")
print((int(input_i[0])+int(input_i[1]))*2)
import sys
input = sys.stdin.buffer.readline
from itertools import combinations
from math import sqrt

n=int(input())
P=[tuple(map(int,input().split())) for _ in range(n)]
P+=[P[0]]

def R(*L):
	a,b,c=[sqrt((p1[0]-p2[0])**2+(p1[1]-p2[1])**2)for p1,p2 in zip(L,L[1:]+L)]
	s=(a+b+c)/2
	return sqrt(s*(s-a)*(s-b)*(s-c))

ans=max(sqrt((p1[0]-p2[0])**2+(p1[1]-p2[1])**2)for p1,p2 in combinations(P,2))
ans_=max(R(*L) for L in combinations(P,3))
print(max(ans,ans_)/2)

### FIXED CODE ###

import sys
input = sys.stdin.buffer.readline
from itertools import combinations
from math import hypot
n=int(input())
P=[tuple(map(int,input().split())) for _ in range(n)]
ans=1e9
for p1,p2 in combinations(P,2):
	X,Y=(p1[0]+p2[0])/2,(p1[1]+p2[1])/2
	r=0
	for x,y in P:
		t=hypot(X-x,Y-y)
		if r<t:r=t
	if ans>r:ans=r
if n>2:
	ans_=1e9
	for p1,p2,p3 in combinations(P,3):
		a=hypot(p2[0]-p3[0],p2[1]-p3[1])
		b=hypot(p3[0]-p1[0],p3[1]-p1[1])
		c=hypot(p1[0]-p2[0],p1[1]-p2[1])
		if (a+b+c)-2*max(a,b,c)<1e-8:continue
		s,t,u=(-a*a+b*b+c*c)*a*a,(a*a-b*b+c*c)*b*b,(a*a+b*b-c*c)*c*c
		X=(s*p1[0]+t*p2[0]+u*p3[0])/(s+t+u)
		Y=(s*p1[1]+t*p2[1]+u*p3[1])/(s+t+u)
		r=0
		for x,y in P:
			t=hypot(X-x,Y-y)
			if r<t:r=t
		if ans_>r:ans_=r
	# print(ans_)
	ans=min(ans,ans_)
print(ans)
n,m=map(int,input().split())
ans=["a"]*n
for i in range(m):
    s,c=map(int,input().split())
    if s>n:
        pans="-1"
        break
    if ans[s-1]=="a" or ans[s-1]==c:
        ans[s-1]=c 
        pans="0"
        if s==1 and c==0:
            pans="-1"
            break
    else:
        pans="-1"
        break
                
ans = [str(i) for i in ans]
if pans != "-1":
    pans="".join(ans)
    pans=pans.replace("a","0")
    if pans[0]=="0":
        pans='1' + pans[1:]
print(pans)

### FIXED CODE ###

n,m=map(int,input().split())
d=["a"]*n
ans=""
if n==1 and m==0:
    print(0)
    exit()
for i in range(m):
    s,c=map(str,input().split())
    if s=="1" and c=="0" and n==1:
        print(0)
        exit()
    s=int(s)
    if d[s-1]=="a" or d[s-1]==c:
        d[s-1]=c #置き換え
    else:
        ans="-1"
        print(ans)
        break
if d[0]!="0" and ans!="-1":
    if d[0]=="a" or d[0]=="0":
        print("".join(["1"]+d[1:]).replace("a","0"))
    else:
        print(("".join(d)).replace("a","0"))
elif d[0]=="0":
    print(-1)
import collections

h, w = list(map(int, input().split()))
smat = [input() for _ in range(h)]

def bfs(x0, y0):
    visited = [0] * h * w
    deq = collections.deque()
    deq.append((x0, y0, -1))

    mx = 0
    while len(deq) > 0:
        x, y, d = deq.popleft()
        nd = d + 1
        visited[x * h + y] = 1
        mx = max(mx, nd)

        for dx, dy in [(-1, 0), (0, -1), (+1, 0), (0, +1)]:
            nx = x + dx
            ny = y + dy
            if not (0 <= nx < h) or not (0 <= ny < w):
                # bound check
                continue
            if smat[nx][ny] == '#':
                # cell attr check
                continue
            if visited[nx * h + ny] == 1:
                # already visited
                continue
            v = (nx, ny, nd)
            deq.append(v)
    
    return mx

mxall = 0
for x0 in range(h):
    for y0 in range(w):
        if smat[x0][y0] == '.':
            mx = bfs(x0, y0)
            mxall = max(mxall, mx)
print(mxall)


### FIXED CODE ###

import collections

h, w = list(map(int, input().split()))
smat = [input() for _ in range(h)]

def bfs(x0, y0):
    visited = [[0 for _ in range(w)] for _ in range(h)]
    deq = collections.deque()
    deq.append((x0, y0, -1))

    mx = 0
    while len(deq) > 0:
        x, y, d = deq.popleft()
        nd = d + 1
        visited[x][y] = 1
        mx = max(mx, nd)

        for dx, dy in [(-1, 0), (0, -1), (+1, 0), (0, +1)]:
            nx = x + dx
            ny = y + dy
            if not (0 <= nx < h) or not (0 <= ny < w):
                # bound check
                continue
            if smat[nx][ny] == '#':
                # cell attr check
                continue
            if visited[nx][ny] == 1:
                # already visited
                continue
            v = (nx, ny, nd)
            deq.append(v)
    
    return mx

if all(all(col == '.' for col in row) for row in smat):
    print((w - 1) + (h - 1))
else:
    mxall = 0
    for x0 in range(h):
        for y0 in range(w):
            if smat[x0][y0] == '.':
                mx = bfs(x0, y0)
                mxall = max(mxall, mx)
    print(mxall)
from collections import defaultdict
import math
def factorial_memo(n, p):
  F = [1] * (n + 1)
  for i in range(n):
    F[i + 1] = F[i] * (i + 1) % p
  return F

def inverse(F, p):
  Finv = [x for x in F]
  Finv[-1] = pow(Finv[-1], p - 2, p)
  for i in range(len(F) - 2, 0, -1):
    Finv[i] = Finv[i + 1] * (i + 1) % p
  return Finv

def comb(*A):
  f = F[sum(A)]
  for a in A:
    f *= Finv[a]
  return f % p

def eratosthenes(limit):
  E = [1] * (limit + 1)
  E[0], E[1] = 0
  prime_table = []
  for i, e in enumerate(E):
    if e:
      primes.append(i)
      for j in range(i, limit + 1, i):
        E[j] = 0
  return prime_table

N, M = map(int, input().split())
p = 10 ** 9 + 7
limit = int(math.sqrt(M)) + 1
prime_table = eratosthenes(limit)
primes = defaultdict(int)
primes[1] = 0
for prime in prime_table:
  if prime > M:
    break
  while M % prime == 0:
    primes[prime] += 1
F = factorial_memo(max(primes.values()) + N, p)
Finv = inverse(F, p)
cnt = 1
for c in primes.values():
  cnt *= comb(c, N - 1)
print(cnt % p)

### FIXED CODE ###

from collections import defaultdict
import math
def factorial_memo(n, p):
  F = [1] * (n + 1)
  for i in range(n):
    F[i + 1] = F[i] * (i + 1) % p
  return F

def inverse(F, p):
  Finv = [x for x in F]
  Finv[-1] = pow(Finv[-1], p - 2, p)
  for i in range(len(F) - 2, 0, -1):
    Finv[i] = Finv[i + 1] * (i + 1) % p
  return Finv

def comb(*A):
  f = F[sum(A)]
  for a in A:
    f *= Finv[a]
  return f % p

def eratosthenes(limit):
  E = [1] * (limit + 1)
  E[0], E[1] = 0, 0
  prime_table = []
  for i, e in enumerate(E):
    if e:
      prime_table.append(i)
      for j in range(i, limit + 1, i):
        E[j] = 0
  return prime_table

N, M = map(int, input().split())
p = 10 ** 9 + 7
limit = int(math.sqrt(M)) + 1
prime_table = eratosthenes(limit)
primes = defaultdict(int)
primes[1] = 0
for prime in prime_table:
  if prime > M:
    break
  while M % prime == 0:
    primes[prime] += 1
    M //= prime
if M > 1:
  primes[M] += 1
F = factorial_memo(max(primes.values()) + N, p)
Finv = inverse(F, p)
cnt = 1
for c in primes.values():
  cnt *= comb(c, N - 1)
print(cnt % p)
import string
s = list(input())
a = list(string.ascii_lowercase)
l = []
s.sort()
if s == a:
    print("None")
else:
    for index, i in enumerate(a):
        if i not in s:
            l.append(i)
    print(min(l))

### FIXED CODE ###

import string
s = list(input())
a = list(string.ascii_lowercase)
l = []
for index, i in enumerate(a):
    if i not in s:
        print(i)
        break
else:
    print(None)
D, T, S = map(int. input().split())
if D/S <= T:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

D, T, S = map(int, input().split())
if D/S <= T:
  print("Yes")
else:
  print("No")
from collections import Counter
N = int(input())
S = input()
#c = Counter(S)
#print (c.most_common())
#ls = list(c.values())
ans = S.count('R') * S.count('G') * S.count('B')


for i in range(N):
    for j in range(1,N):
        a = i + j
        b = i + j + j
        if (b >= N):
            break
        else:
            l = S[i]
            m = S[a]
            r = S[b]
            if l!=m and m!=r and r!=l:
                ans -= 1
        # if (i-j<0 or i+j>=N):
        #     break
        # l = S[i-j]
        # m = S[i]
        # r = S[i+j]
        # if l!=m and m!=r and r!=l:
        #     ans -= 1
print (ans)


### FIXED CODE ###

from collections import Counter
N = int(input())
S = input()
#c = Counter(S)
#print (c.most_common())
#ls = list(c.values())
ans = S.count('R') * S.count('G') * S.count('B')


for i in range(N):
    for j in range(1,N):
        if (i-j<0 or i+j>=N):
            break
        #print (i,j)
        #s = set([S[i-j],S[i],S[i+j]])
        l = S[i-j]
        m = S[i]
        r = S[i+j]

        if l!=m and m!=r and r!=l:
            ans -= 1
        # if len(s)==3:
        #     ans -= 1
print (ans)
import bisect

_ = input()

heads = list(sorted(map(int,input().split())))
bodies = list(map(int,input().split()))
legs = list(sorted(map(int,input().split())))


cnt = 0
for body in bodies:
    #  頭は、体より小さくなければならない
    head_idx = bisect.bisect_left(sorted_heads, body)
    head_cnt = len(sorted_heads[:head_idx])

    #  足は、体より大きくなければならない
    leg_idx = bisect.bisect_right(sorted_legs, body)
    leg_cnt = len(sorted_legs[leg_idx:])

    cnt += head_cnt * leg_cnt # 組み合わせの掛け算

print(cnt)


### FIXED CODE ###

import bisect

N = int(input(), 10)

heads = list(sorted(map(int,input().split())))
bodies = list(map(int,input().split()))
legs = list(sorted(map(int,input().split())))


cnt = 0
for body in bodies:
    #  頭は、体より小さくなければならない
    head_cnt = bisect.bisect_left(heads, body)
    #  足は、体より大きくなければならない
    leg_cnt = N - bisect.bisect_right(legs, body)

    cnt += head_cnt * leg_cnt # 組み合わせの掛け算

print(cnt)
n,d = map(int,input().split())
p = n/(2d+1)
if p % 1 ==0:
  print(p)
else:
  print((p//1)+1)

### FIXED CODE ###

import math
n,d = map(int,input().split())
print(math.ceil(n/(2*d+1)))
n = int(input())
a_list = np.array(list(map(int, input().split())))
if 0 in a_list:
    print(0)
else:
    ans = 1
    flag = 1
    for i in range(0, n):
        ans *= int(a_list[i])
        if ans > 10 ** 18:
            flag = 0
            break
    if flag == 0:
        print(-1)
    else:
        print(ans)

### FIXED CODE ###

n = int(input())
a_list = list(map(int, input().split()))
if 0 in a_list:
    print(0)
else:
    ans = 1
    flag = 1
    for i in range(0, n):
        ans *= int(a_list[i])
        if ans > 10 ** 18:
            flag = 0
            break
    if flag == 0:
        print(-1)
    else:
        print(ans)
import math
from functools import reduce

N = int(input())
T = [int(input()) for i in range(N)]


def gcd(numbers):  # "numbers" is list
    return reduce(math.gcd, numbers,1)


def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)


def lcm(numbers):  # "numbers" is list
    return reduce(lcm_base, numbers,
                  1)  # [third argument] return 1 if "numbers" is empty


print(lcm(T))

### FIXED CODE ###

import math
from functools import reduce

N = int(input())
T = [int(input()) for i in range(N)]

# def gcd(numbers):  # "numbers" is list
#     return reduce(math.gcd, numbers)

# def lcm_base(x, y):
#     return (x * y) // math.gcd(x, y)


#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


#a,bの最小公倍数
def lcm_base(a, b):
    return a * b // gcd(a, b)


def lcm(numbers):  # "numbers" is list
    return reduce(lcm_base, numbers,
                  1)  # [third argument] return 1 if "numbers" is empty


print(lcm(T))
import math
import numpy as np

n=int(input())
a=np.array([int(i) for i in input().split()])

ans=0
for i in range(n):
    b=np.array([x for x in a if not x==a[i]])
    for j in range(n-2):
        d=math.gcd(b[0],b[1])
        b=np.delete(b,0)
        b[0]=d
    c=b[0]
    if ans<c: ans=c
print(ans)    

### FIXED CODE ###

#c
n=int(input())
a=[int(i) for i in input().split()]
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
l=[1]*n
r=[1]*n
l[0]=a[0]
r[0]=a[n-1]
for i in range(1,n):
    l[i] = gcd(l[i-1],a[i])
    r[i] = gcd(r[i-1],a[n-i-1])
if n>=3:
    ans = max(l[-2],r[-2],max(gcd(l[i-1],r[n-i-2]) for i in range(1,n-1)))
    print(ans)
else:
    print(max(a))
S = int(input())
N = 10**9
x = (N - S%N) % N
y = S//x2 + 1
print(0,0,10**9,1,x,y)


### FIXED CODE ###

S = int(input())
x1 = 0
y1 = 0
x2 = 10**9
y2 = 1
x3 = (x2-S%x2)%x2
y3 = -(-S//x2)
print(x1,y1,x2,y2,x3,y3)
import math

n = int(input())
for i in range(n):
    for i in range(2):
        x = int(input())
        y = int(input())
        result = x * y
        print(result) if math.log10(result) + 1 < 10 ** 80 else print("overflow")

### FIXED CODE ###

n = int(input())
for i in range(n):
    x = int(input())
    y = int(input())
    if x + y >= 10 ** 80:
        print("overflow")
    else:
        print(x + y)