peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
import math
x=int(input())
y=x//100
z=math.ceil((x%100)/5)
if y >= z:
  print(1)
else:
  print(0)
# Judge status: Accepted
o = input()
e = input()+" "
ans = ""
for i in range(len(o)):
    ans += o[i]+e[i]
print(ans)
# Judge status: Accepted
import sys
N=int(input())
for i in range(1,10):
    for j in range(1,10):
        if i*j==N:
            print('Yes')
            sys.exit()
print('No')
# Judge status: Accepted
N,K = map(int,input().split())
alist = list(map(int,input().split()))
alist.sort(reverse=True)
p = 0
for i in range(K,N):
    p = p + alist[i]
print(p)
# Judge status: Accepted
#15:15
x,y = map(int,input().split())
if x % y == 0:
  print(-1)
else:
  print(x)
# Judge status: Wrong Answer
def main():
    N, K = map(int,input().split())
    AB = [list(map(int,input().split())) for _ in range(N)]
    S = []
    for ab in AB:
        S.extend([ab[0]]*ab[1])
    print(S[K-1])
            

if __name__ == '__main__':
    main()
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()
 
x, y = map(int, input().split())

cnt = 1

while True:
    if x*2 <= y:
        cnt += 1
        x *= 2
    else:
        break
print(cnt)
# Judge status: Wrong Answer
# coding: utf-8
import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
heapq.heapify(A)
minus = 0
print(*A)
for i in range(M):
    b, c = map(int, input().split())
    if A[0] < c:
        for j in range(b):
                tmp = heapq.heappop(A)
                heapq.heappush(A, c)
print(sum(A))
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
#-------------------------------------

c = int(input())
print( c*6 )
# Judge status: Accepted
n,m = map(int, input().split())
redl = [False]*(n+1)
redl[1] = True
cnts = [1]*(n+1)
cnts[0] = 1

for _ in range(m):
    x,y = map(int, input().split())
    if redl[x]: redl[y] = True
    if cnts[x] == 1: redl[x] = False
    cnts[x] -= 1
    cnts[y] += 1

ans = redl.count(True)
print(ans)
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())

ans = float('inf')
for i in range(0,2*max(x,y)+1,2):
    ab = i
    x_tmp = x - i//2
    y_tmp = y - i//2
    tmp = max(0,a*x_tmp) + max(0,b*y_tmp) + c*i
    if tmp < ans:
        ans = tmp
print (ans)
# Judge status: Accepted
a,b = map(int,input().split())
ans = 0
for _ in range(2):
  if a >= b:
    ans += a
    a -= 1
  else:
    ans += b
    b -= 1
print(ans)
# Judge status: Accepted
import sys
import numpy as np

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():
    n = ni()
    A = nl()
    cumA = np.cumsum(A)
    total = cumA[-1]
    ans = 10 ** 10000
    for a in cumA[:-1]:
        ans = min(ans, abs(a - (total - a)))
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
a, b, c, d = map(int, input().split())
print(max(b - c - max(b - d, 0), 0))
# Judge status: Accepted
# A - Colorful Transceivers
# https://atcoder.jp/contests/abc097/tasks/abc097_a

a, b, c, d = map(int, input().split())

result = 'No'

if abs(a - c) <= d:
    result = 'Yes'
elif abs(a - b) <= d and abs(b - c) <= d:
    result = 'Yes'

print(result)
# Judge status: Accepted
str = input() 

if str[len(str)-1] == "s":
	str = str + "es"
else:
	str = str + "s"

print(str)
# Judge status: Wrong Answer
s = input()
if 'hi' in s:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
s=list(input())
ans=[]
num=0
for i in range(len(s)):
    if s[i]=="1":
        ans.append("1")
        num+=1
    elif s[i]=="0":
        ans.append("0")
        num+=1
    else:
        if num!=0:
            del ans[-1]
            num-=1
print("".join(ans))
# Judge status: Accepted
A,B,C = map(int,input().split())
if A<=C and C <= B:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
# https://atcoder.jp/contests/abc161/tasks/abc161_d
from collections import deque

K = int(input())
ans = 0
count = 0
queue = deque()
for i in range(1, 10):
    queue.append(i)

while True:
    count += 1
    a = queue.popleft()
    if count == K:
        print(a)
        exit(0)

    for i in range(-1, 2):
        d = a % 10 + i
        if d < 0 or d > 9:
            continue
        queue.append(a * 10 + d)
# Judge status: Accepted
n, k = list(map(int, input().split()))
arr = list(map(int, input().split()))

for i in range(n-k):
    if (arr[i]<arr[i+k]):
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
n,k=map(int,input().split())
a=[int(x) for x in input().rstrip().split()]

l=[0 for i in range(n)]
cnt=0

dist=[]
now=0
while(True):
  
  if l[now]+1==3:
    break
  dist.append(now)

  l[now]+=1
  now=a[now]-1


# k=k-l.count(1)
g=l.count(2)
# print(dist)
# print(l)
print(dist[k%g+l.count(1)]+1)
# Judge status: Accepted
import math
N = int(input())
Nlist = [list(map(int, input().split())) for i in range(N)]
total = 0
for i in range(N-1):
    for j in range(i+1, N):
        total += math.sqrt((Nlist[i][0]-Nlist[j][0])
                           ** 2+(Nlist[i][1]-Nlist[j][1])**2)
ans = total*2/N
print(ans)
# Judge status: Wrong Answer
a, b, c, d = map(int, input().split())
print(max(0,max(a,c)-min(b,d)))
# Judge status: Accepted
a,b,c,k = map(int,input().split())
print(a-b if k%2==0 else b-a)
# Judge status: Accepted
def resolve():
    A,B,C,D = map(int,input().split())
    N = int(input())*4
    cc = [(8*A,A,1),(4*B,B,2),(2*C,C,4),(D,D,8)]
    cc.sort()
    ans = 0

    for _,cost,vol in cc:
         enable = N//vol
         ans += enable*cost
         N %= vol
    print(ans)
resolve()
# Judge status: Wrong Answer
s=input()
K=int(input())
znum=ord("z")
count=0
ans=[]
lst=dict()

for i in range(len(s)):
    num=ord(s[i])
    if s[i]=="a":
        ans.append("a")
        continue
    sa=znum-num+1
    if sa<=K:
        ans.append("a")
        K-=sa
    else:
        ans.append(s[i])

if count<K:
    K%=26
    ans[-1]=chr(ord(s[-1])+K)

S=""
for i in range(len(ans)):
    S=S+ans[i]
print(S)
# Judge status: Accepted
from heapq import heappush, heappop
N = int(input())
AB = []

for i in range(N):
  a, b = map(int, input().split())
  heappush(AB, (b, a))


current = 0

for i in list(range(N)):
  deadline, cost = heappop(AB)

  if current + cost > deadline: # 締め切り時間を過ぎてしまっているとき
    print("No")
    exit()
  
  current += cost

print("Yes")
# Judge status: Accepted
import sys
import numpy as np
from numba import jit
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, K, *A = map(int, read().split())
K = min(50,K)

@jit
def imos(A):
  B = np.zeros_like(A)
  for i,x in enumerate(A):
    a = max(0,i-x)
    b = min(N-1,i+x)
    B[a] += 1
    if b+1 <= N-1:
      B[b+1] -= 1
  B = np.cumsum(B)
  return B

for i in range(K):
  if i >= 50:
    break
  A = imos(A)
print(*A)
# Judge status: Wrong Answer
n = int(input())
x = list(map(int, input().split()))
y = sorted(x)
p = y[n//2]
q = y[(n//2)-1]
for i in range(n):
    if x[i] == p:
        print(q)
    else:
        print(p)
# Judge status: Accepted
C=input()
print(chr(((ord(C)-ord('a'))+1)%26+ord('a')))
# Judge status: Accepted
N, A, B = map(int,input().split())
S = input()

Fore_rank = 1
passed = 0

for i in range(N):
    if S[i] == 'a' and A+B > passed:
        print("Yes")
        passed += 1
    elif S[i] == 'b' and A+B > passed and B >= Fore_rank:
        print("Yes")
        Fore_rank += 1
        passed += 1
    else: print("No")
# Judge status: Accepted
n, m = map(int, input().split())
# a = [0] * m
# b = [0] * m
# for i in range(m):
#     a[i], b[i] = map(int, input().split)
answer = [0] * (n+1)
for _ in range(m):
    a, b = map(int, input().split())
    answer[a] += 1
    answer[b] += 1

for i in range(1, n+1):
    print(answer[i])
# Judge status: Accepted
X,Y,A,B,C = map(int, input().split())
p = sorted(list(map(int, input().split())), reverse=True)
q = sorted(list(map(int, input().split())), reverse=True)
r = sorted(list(map(int, input().split())), reverse=True)

l = p[:X] + q[:Y] + r
print(sum(sorted(l, reverse=True)[:X+Y]))
# Judge status: Wrong Answer
a, b = map(int, input().split())
s = min(a, b)
print(s)
# Judge status: Wrong Answer
n = int(input())
ans = 0
for i in range(1,n+1):
  for j in range(1,n+1):
    if j%i == 0:
      ans += i
print(i)
# Judge status: Wrong Answer
a,b,x=map(int,input().split())
if(a<=x or a+b==x):
   print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
import math

N, K = map(int,input().split())
l = list(map(int,input().split()))
tag = l.index(1)

print(math.ceil((N-1-tag)/(K-1))+math.ceil(tag/(K-1)))
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-

s = list(input())

tmp_str =""
output=""
start = False
end = False
for ss in s:
    if ss == 'A' and start == False:
        tmp_str = ss
        start = True
    elif ss == 'Z' and start == True:
        tmp_str += ss
        if len(output) < len(tmp_str):
            output = tmp_str
        end = True
    elif end == True:
        start = end = False
        if len(output) < len(tmp_str):
            output = tmp_str
    elif start == True:
        tmp_str += ss

print(len(output))
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))
B=[0]*n
for i in range(n):
    now=(n-i)*2
    cnt=A[n-i-1]
    while now<=n:
        cnt+=B[now-1]
        now+=n-i
    if cnt%2==1:
        B[n-i-1]=1
print(sum(B))
for i in range(n):
    if B[i]:
        print(i+1,end=" ")
# Judge status: Wrong Answer
# coding: utf-8


def solve(*args: str) -> str:
    x = args[0]
    return '0' if x == '1' else '0'


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))
# Judge status: Wrong Answer
def check():
  A = list(map(int, input().split()))
  if A.count(5)!=2 or A.count(7)!=1:
    return 'No'
  return 'Yes'
print(check())
# Judge status: Accepted
A,B,C=map(int,input().split())
print(A*B//2)
# Judge status: Wrong Answer
n = int(input())
ans = 0
if n < 10:
  ans += n
else:
  ans += 9
  if n < 1000:
    ans += max(0, n-1000)
  else:
    ans += 900
    if n < 100000:
      ans += max(0, n-100000)
    else:
      ans += 90000
print(ans)
# Judge status: Accepted
import itertools
A=[list(map(int,input().split())) for i in range(3)]
A=list(itertools.chain.from_iterable(A))
N=int(input())
for _ in range(N):
    b=int(input())
    try:
        A[A.index(b)]="X"
    except:
        continue
answer="No"
for bingo in [[0,1,2],[3,4,5],[6,7,8],[0,4,8],[2,4,6],[0,3,6],[1,4,7],[2,5,8]]:
    if A[bingo[0]]=="X" and A[bingo[1]]=="X" and A[bingo[2]]=="X":
        answer="Yes"
print(answer)
# Judge status: Wrong Answer
mod = 1000000007

N = int(input())

A = 1
B = 1
C = 1

for _ in range(1,N+1):
  A *= 10
  A %= mod
  B *= 9
  B %= mod
  C *= 8
  C %= mod

ans = A - (2*B - C)

print(ans)
# Judge status: Accepted
n = input()
s=""
for i in range(len(n)):
    if(n[i]=="B"):
        if(s != ""):
            s=s[:-1]
    else:
        s+=n[i]
print(s)
# Judge status: Accepted
a, b, m = map(int,input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
ans = 10**19
for i in range(m):
  x, y, c = map(int,input().split())
  ans = min(A[x-1]+B[y-1]-c, ans)
print(min(ans,min(A)+min(B)))
# Judge status: Accepted
s = input()
t = input()

ss = sorted(s)
tt = sorted(t, reverse=True)

print('Yes') if ss < tt else print('No')
# Judge status: Accepted
S={c:list(input()) for c in "abc"}
s="a"
while S[s]:s=S[s].pop(0)
print(s.upper())
# Judge status: Wrong Answer
import numpy

def multiply(r):
  s = r*r
  return s
# Judge status: Accepted
T=input()

print(T.replace('?', 'D'))
# Judge status: Accepted
n,m = map(int, input().split())
k = [list(map(int, input().split())) for i in range(n)]
c = 0
for i in range(1,m+1):
    for j in range(n):
        if i not in k[j][1:]:
            break
    else:
        c+=1
print(c)
# Judge status: Accepted
import sys

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


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

    for x in range(N, 1000):
        if len(set(str(x))) == 1:
            print(x)
            return

    return


if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
sum = 0
for i in range(n-1):
    if a[i] > a[i+1]:
        b = a[i] - a[i+1]
        a[i+1] += b
        sum += b
print(sum)
# Judge status: Accepted
import math

H = int(input())
W = int(input())
N = int(input())

ans = math.ceil(N/max(H,W))
print(ans)
# Judge status: Wrong Answer
import math
a,b=map(int,input().split())
arr=[]
for i in range(1,101,1):
  if a==math.floor(i*0.08) and b==math.floor(i*0.1) :
    print(i)
    exit()
print(-1)
# Judge status: Accepted
def main():
    N, M = map(int, input().split())
    L, R = 0, 1001001
    for i in range(M):
        l, r = map(int, input().split())
        L = max(L, l)
        R = min(r, R)
    print(max(0, R - L + 1))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
A, B, C = map(int, input().split())
if A%2 == 0 or B%2 == 0 or C%2 == 0:
  print(0)
else:
  dice = [A, B, C]
  dice.sort(reverse=True)
  print(A*B*C-dice[1]*dice[2])
# Judge status: Accepted
S = input()
T = input()

min_count = 1000
for idx in range(len(S) - len(T) + 1):
    s = S[idx:idx+len(T)]
    count = sum([1 if tc!=sc else 0 for tc, sc in zip(T, s)])
    min_count = min(min_count, count)

print(min_count)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
count = 0
for i in range(n):
    if i % 2 == 1:
        continue
    elif a[i] % 2 != 0:
        count += 1

print(count)
# Judge status: Wrong Answer
def main():
    N = int(input())
    ans = 0
    for c in range(1, N):
        ans += solve(N-c)
    print(ans)

def solve(n):
    res = 0
    for i in range(1,n//2):
        if n % i == 0:
            res += 1
    return res

main()
# Judge status: Wrong Answer
N = int(input())

if N == 1:
  print(0)
elif N == 2:
  print(1)
else:
  total = (N*(N-1))/2
  print(int(total))
# Judge status: Accepted
n=input()
ans = True
for i in range(0, len(n), 2):
    if n[i: i+2] != "hi":
        ans = False

if ans:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys
n, ans = map(int, input().split())

for x in range(n + 1):
    for y in range(n + 1 - x):
        if n - x - y >= 0:
            if (10000 * x + 5000 * y + 1000 * (n - x - y)) == ans:
                print(x, y, n - x - y)
                sys.exit()

print('-1 -1 -1')
# Judge status: Accepted
N=input()

S=[-1]*len(N)
for i in range(len(N)):
    S[i]=int(N[i])

if sum(S[1:])== 9*(len(S)-1):
    print(sum(S))
else:
    print(9*(len(S)-1) + (S[0]-1))
# Judge status: Accepted
import io,sys
sys.setrecursionlimit(10**6)


def main():
    X = list(map(int,sys.stdin.readline().rstrip().split()))
    g = set([0,1,2,3,4,5])

    a = list(g - set(X))
    print(a[0])
main()
# Judge status: Accepted
A,V = map(int,input().split())
B,W = map(int,input().split())
T=int(input())

place_A=A+(T*V)
place_B=B+(T*W)

place_A_1=A-(T*V)
place_B_1=B-(T*W)

if A<B:
    if place_A>=place_B:
        print("YES")

    else:
        print("NO")

else:
    if place_A_1<=place_B_1:
        print("YES")
    else:
        print("NO")
# Judge status: Wrong Answer
n = int(input())
pre_t = 0
for i in range(n):
    t, x, y=map(int, input().split())
    if (x + y) > (t - pre_t) or (x + y + (t - pre_t)) % 2:
        print("No")
        exit()
    pre_t = t
print("Yes")
# Judge status: Accepted
s = input()
n = len(s) + 1
dp = [0] * n
for i, c in enumerate(s):
  if c == '<':
    dp[i+1] = dp[i] + 1

for i, c in enumerate(reversed(s)):
  if c == '>':
    dp[-i-2] = max(dp[-i-2], dp[-i-1] + 1)

print(sum(dp))
# Judge status: Accepted
n=int(input())

def digit(n,m):
    a=n
    _list = []
    while True:
        _list.append(a%m)
        a=a//m
        if a==0:
            break
    return sum(_list)

ans=10**10
for i in range(n+1):
    ans=min(ans,digit(i,6)+digit(n-i,9))
print(ans)
# Judge status: Wrong Answer
a,b = input().split()
c = float(a)*float(b)
d = str(c).split(".")[0]
print(int(d))
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
N = float("INF")
ans = 0
for i in range(1,n):
    if abs(a[i]-(a[0]-a[i])) < N:
        N = abs(a[i]-(a[0]-a[i]))
        ans = a[i]
print(a[0], ans)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
cnt = []
over = 0
for i in range(n):
    m = a[i] // 400
    if m < 8:
        if m not in cnt:
            cnt.append(m)
    else:
        over += 1
if len(cnt) > 0:
    print(len(cnt), len(cnt)+over)
else:
    print(1, len(cnt)+over)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

tmp = [0 for i in range(N+1)]
length = 0
for i in range(N):
  tmp[i+1] = tmp[i] + A[i]
  length += A[i]
  
ans = 10 ** 10
for i in range(1, N+1):
 ans = min(ans, abs((length - tmp[i]) - tmp[i]))

print(ans)
# Judge status: Accepted
N=int(input())
A=[]
B=[]
for i in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)
A.sort()
B.sort()
if N%2!=0:
    n=(N+1)//2
    ans=B[n-1]-A[n-1]+1
else:
    n=N//2
    ans1=(A[n-1]+A[n])/2
    ans2=(B[n-1]+B[n])/2
    ans=(ans2-ans1)*2+1
print(int(ans))
# Judge status: Accepted
import os, sys, re, math

N = int(input())
S = dict()
for i in range(N):
    w = ''.join(sorted(input()))
    if w in S:
        S[w] += 1
    else:
        S[w] = 1

count = 0
for (w, n) in S.items():
    if n > 1:
        count += (n * (n - 1)) // 2
print(count)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A = sorted(A, reverse=True)
print(sum(A[::2])-sum(A[1::2]))
# Judge status: Wrong Answer
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
import itertools
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()

data = {}
for x in ["a","b","c"]:
    data[x] = input()

pick = "a"
while True:
    data[pick] = data[pick][1:]
    if data[pick] == "":
        break
    pick = data[pick][0]
print(pick.upper())
# Judge status: Accepted
import fractions
def gcdlist(a):
    ans = a[0]
    for i in range(1, len(a)):
        ans = fractions.gcd(ans, a[i])
    return ans

n,y=map(int,input().split())
x=list(map(int,input().split()))
x.append(y)
if y==1:
    print(abs(x[0]-1))
    exit()

l=[]
for i in range(n):
    l.append(abs(x[i+1]-x[i]))
print(gcdlist(l))
# Judge status: Accepted
a,b=map(int,input().split())
print((a+b+1)//2)
# Judge status: Wrong Answer
N=int(input())
A=list(map(int,input().split()))
S=[0 for j in range(N+1)]
count=0
for i in range(N):
  S[A[i]]+=1
for i in range(N):
  count+=S[i]*(S[i]-1)//2
for i in range(N):
  print(count-(S[A[i]]-1))
# Judge status: Accepted
def factorial(n, mod):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
        fact %= mod
    return fact

N = int(input())
mod = 10 ** 9 + 7
print(factorial(N, mod))
# Judge status: Wrong Answer
N, K = map(int, input().split())
S = input()

d = 0
for i in range(N-1):
	if(S[i]!=S[i-1]):
		d += 1
d = max(0, d - 2 * K)
print(N - 1 - d)
# Judge status: Accepted
n= int(input())
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))

ans = 0
cnt = 0

while cnt < n:
    tmp = 0
    for i in range(n-cnt):
        tmp += a1[i]
    for j in range(cnt+1):
        tmp += a2[-1*(j+1)]
    ans = max(ans, tmp)
    cnt += 1
print(ans)
# Judge status: Accepted
a,b=map(int,input().split(' '))
print((a+b-1)//b)
# Judge status: Accepted
w=list(input())
n=len(w)
S=0
S_max=S
for i in range(n):
  if w[i]=='R':
    S+=1
    j=0
    while True:
      if i+j+1<=n-1:
        j+=1
        if w[i+j]=='R':
          S+=1
        else:
          i+=j
          break
      else:
        i=n-1
        break
  S_max=max([S_max,S])
  S=0
print(S_max)
# Judge status: Accepted
a=int(input())
import sys
for i in range(1,10):
  for j in range(1,10):
    if i*j==a:
      print('Yes')
      sys.exit()
print('No')
# Judge status: Accepted
X = int(input())

if 400 <= X <=599 :
  print("8")
elif 600 <= X <=799 :
  print("7")
elif 800 <= X <=999 :
  print("6")
elif 1000 <= X <=1199 :
  print("5")
elif 1200 <= X <=1399 :
  print("4")
elif 1400 <= X <=1599 :
  print("3")
elif 1600 <= X <=1799 :
  print("2")
elif 1800 <= X <=1999 :
  print("1")
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))

X=[]
b=a[0]
for i in range(1,n) :
    b^=a[i]

for i in range(n) :
    x=b^a[i]
    X.append(x)

for i in X :
    print(i,end=" ")
# Judge status: Wrong Answer
n, x = map(int,input().split())
l = list(map(int,input().split()))
i, d =  0, 0
while i<n and d <= x:
    d += l[i]
    i += 1
if d == x and i == n:
    print(min(i+1,n))
else:
    print(min(i,n))
# Judge status: Accepted
x = int(input())
dp = [False]*101000
dp[0] = True
l = [100, 101, 102, 103, 104, 105]
for i in range(100001):
  for j in l:
    if dp[i]:
      dp[i+j] = True
if dp[x]:
  print(1)
else:
  print(0)
# Judge status: Accepted
A,B = map(str,input().split())
cnt = 0
for i in range(int(A),int(B)+1):
    l = list(str(i))
    flag = True
    n = len(l)
    for j in range(n//2):
        if l[j] != l[n-j-1]:
            flag = False
    
    if flag:
        cnt += 1

print(cnt)
# Judge status: Accepted
X=int(input())
i=1
while i*(i+1)//2<X:
    i+=1
print(i)
# Judge status: Wrong Answer
N = int(input())
if N % 2 == 0:
  print((N + 1) * N / 2)
else:
  print(N * (N - 1) / 2 + N)
# Judge status: Wrong Answer
n = int(input())
point_sum = []
for i in range(n):
  a,b = map(int, input().split())
  point_sum.append(a+b)
print(max(point_sum) - min(point_sum))
# Judge status: Accepted
n, m = map(int, input().split())

days = list(map(int,input().split()))

if sum(days) > n:
  print(-1)
else:
  print(n - sum(days))
# Judge status: Accepted
s = input()
t = input()
print("Yes" if s == t[:-1] else "No")
# Judge status: Wrong Answer
n,x = map(int, input().split())
L = list(map(int, input().split()))

H = 0
count = 0
for i in range(n):
  if H > x:
    print(count)
    exit()
  else:
    H += L[i]
    count += 1
  
print(n+1)
# Judge status: Accepted
a, b, c, d = map(int, input().split())


ans = max(a * c, a * d, b * c, b * d)
print(ans)
# Judge status: Accepted
N, M, K = map(int, input().split())
ok = False
for i in range(N + 1):
    for j in range(M + 1):
        now = M * i
        now -= j * i
        now += j * (N - i)
        if now == K:
            ok = True
if ok:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
A, B, C = map(int, input().split())

print(max(C - (A - B), 0))
# Judge status: Accepted
import numpy as np
import scipy as sp
import math

a, b, c = map(int, input().split())
d = a + b + c
if(d<22):
  print("win")
else:
  print("bust")
# Judge status: Accepted
from collections import defaultdict


def main():
    n = int(input())
    a = [int(an) for an in input().split()]
    cnt = defaultdict(int)
    for an in a:
        cnt[an - 1] += 1
        cnt[an] += 1
        cnt[an + 1] += 1
    print(max(cnt.values()))


if __name__ == "__main__":
    main()
# Judge status: Accepted
s=input()
t=0
if s[0]=="A":
    if(s[2:-1].count("C")==1):
        for i in s:
            if i!="A" and i!="C":
                if i.isupper():
                    t=0
                    break
                else:
                    t=1
if t==0:
    print("WA")
else:
    print("AC")
# Judge status: Wrong Answer
import math

a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
if th == 0:
    print('{:.20f}'.format(abs(a - b)))
    exit()
elif th == 180:
    print('{:.20f}'.format(a + b))
    exit()
if th >= 180:
    th -= 180
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b * cos
print('{:.20f}'.format(math.sqrt(ans)))
# Judge status: Wrong Answer
K,A,B=map(int,input().split())

if B <= A:
  print(1+K)
  exit()
  
if K<A+1:
  print(1+K)
  exit()

if B - A<=2:
  q,r = divmod(K-1,A)
  print(q*B+r)
  exit()
  
r1 = A-1
K -= r1
q,r = divmod(K,2)
for i in range(q):
  if i == 0:
    res = B
    continue
  q2,res = divmod(res,A)
  res += q2*B
  
print(res+r)