Harryxun/stf_run huggingface dataset:
import itertools


if __name__ == '__main__':
    N, A, B, K = map(int, input().split())
    li = [i for i in range(N)]
    ans = 0
    for ai in range(N):
        tmp = K-(ai*A)
        if tmp / B <= N and tmp % B == 0:
            bi = tmp // B
            a = len(list(itertools.combinations(li, ai)))
            b = len(list(itertools.combinations(li, bi)))
            ans += a*b
    print(ans)


### FIXED CODE ###

if __name__ == '__main__':
    n = int(input())
    ans = 99999999
    for i in range(1, n):
        total = list(str(n-i)) + list(str(i))
        tmp = 0
        for t in total:
            tmp += int(t)
        ans = min(ans, tmp)
    print(ans)
r = input()
 
l = 2*math.pi*r
s = r*r*math.pi
 
print "%.8f %.8f" %(float(l), float(s))

### FIXED CODE ###

import math
 
r = float(input())
    
l = 2*math.pi*r
s = r*r*math.pi
    
print "%.8f %.8f" %(s, l)
def dfs(u,D):
    for v,w in tree[u]:
        if d[v]==-1:
            d[v]=(D+w)%2
            dfs(v,D+w)

N=int(input())
d=[-1 for _ in range(N)]
d[0]=0
tree=[[] for _ in range(N)]

for _ in range(N-1):
    u,v,w=map(int,input().split())
    u-=1
    v-=1
    tree[u].append([v,w])
    tree[v].append([u,w])

dfs(0,0)
for i in d:
    print(i%2)

### FIXED CODE ###

import sys

def dfs(u,D):
    sys.setrecursionlimit(10**6)
    for v,w in tree[u]:
        if d[v]==-1:
            d[v]=(D+w)%2
            dfs(v,D+w)

N=int(input())
d=[-1 for _ in range(N)]
d[0]=0
tree=[[] for _ in range(N)]

for _ in range(N-1):
    u,v,w=map(int,input().split())
    u-=1
    v-=1
    tree[u].append([v,w])
    tree[v].append([u,w])

dfs(0,0)
for i in d:
    print(i%2)
a = {x:0 for x in range(ord('a'), ord('z') + 1)}

#while True:
text = input()
for x in text:
    a[ord(x.lower())] += 1

for x in range(ord('a'), ord('z') + 1):
    print(chr(x), ':', a[x])

### FIXED CODE ###

a = {x:0 for x in range(ord('a'), ord('z') + 1)}

while True:
    try:
        text = input()
        for x in text:
            if ord('a') <= ord(x) <= ord('z') or ord('A') <= ord(x) <= ord('Z'):
                a[ord(x.lower())] += 1
    except EOFError:
        break

for x in range(ord('a'), ord('z') + 1):
    print(chr(x), ':', a[x])
w,h,x,y = map(int,input().split())

a = min(x,w-x)
s = h*a

b = min(y, h-y)
t = w*b

result = 0

if x == w/2 and y == h/2:
    result = 1

u = 0
if x == 0 or x == w or y == 0 or y == h:
    u = h*w/2

v = 0
if y/x == h/w or y == -h/w + h:
    v = h*w/2

print(max(s,t,u,v),result)


### FIXED CODE ###

w,h,x,y = map(int,input().split())

a = min(x,w-x)
s = h*a

b = min(y, h-y)
t = w*b

result = 0

if x == w/2 and y == h/2:
    result = 1

print(h*w/2,result)
N = int(input())
H = list(map(int, input().split())
ans = 1
height = H[0]
for i in range(1, N+1):
    if H[i] >= height:
        ans += 1
        height = H[i]

print(ans)

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
ans = 1
height = H[0]
for i in range(1, N):
    if H[i] >= height:
        ans += 1
        height = H[i]

print(ans)
import math
con = 0;
n = int(input())
nn = n**2
a = [0]*nn

m = int(math.sqrt(n) // 1);
for x in range(1,m+1):
    for y in range(1,m+1):
        for z in range(1,m+1):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            a[s-1] += 1;


for v in range(n):
    print(a[v]);

### FIXED CODE ###

import math
con = 0;
n = int(input())
a = [0]*n

m = int(math.sqrt(n) // 1);
for x in range(1,m+1):
    for y in range(1,m+1):
        for z in range(1,m+1):
            s = x**2 + y**2 + z**2 + x*y + y*z + z*x;
            if s <= n:
                a[s-1] += 1;


for v in range(n):
    print(a[v]);
# coding: utf-8

a, b, c, d = map(int, input().split())
alice_time = [x for x in range(a, b+1)]
bob_time = [x for x in range(c, d+1)]
pushed_time = set(alice_time) & set(bob_time)

if len(pushed_time) == 0:
	print(0)
else:
	print(pushed_time - 1)

### FIXED CODE ###

# coding: utf-8

a, b, c, d = map(int, input().split())
alice_time = [x for x in range(a, b+1)]
bob_time = [x for x in range(c, d+1)]
pushed_time = set(alice_time) & set(bob_time)

if len(pushed_time) == 0:
  print(0)
else:
  print(len(pushed_time) - 1)
import numpy as np
import math
while True:
    n= int(input())
    if n == 0:
        break
    a=list(map(float,input().split()))
    m=np.mean(a)
    s=0
    for i in a:
        s+=(i-m)**2
    s/=n
    print("{0:.8f}".format(math.sqrt(s)))

### FIXED CODE ###

while True:
    n = int( input() )
    if n==0:
        break
    a=list(map(int, input().split()))
    m=sum(a)/n
    s=0
    for i in a:
        s+=(i-m)**2
    print( ( s/n)**0.5 )
from decimal import *
import math
A,B = input().split()
A = Decimal(float(A))
B = Decimal(float(B))
print(math.floor(A*B))

### FIXED CODE ###

from collections import defaultdict

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def Fib(n):
    a, b = 0, 1
    if n == 1:
        return a
    elif n == 2:
        return b
    else:
        for i in range(n-2):
            a, b = b, a + b
        return b

N = int(input())
if(N == 1):
    print(0)
else:
    fact = factorization(N)
    l = [i for i in range(1,1000)]
    count = 0
    d = {}
    for n in fact:
        num = n[1]
        for f in l:
            num -= f
            if(num < 0):
                break
            count += 1
    print(count)
from collections import deque

n, q = map(int, input().split())

g = [[] for _ in range(n)]
for i in range(n - 1):
    a, b = map(int, input().split())
    g[a - 1].append(b - 1)
    g[b - 1].append(a - 1)

c = [0] * n

for j in range(q):
    p, x = map(int, input().split())
    c[p - 1] += x

used = [0] * n
used[0] = 1

def dfs(x):
    cost=c[x]
    for nx in g[x]:
        if used[nx]:
            continue
        used[nx]=1
        c[nx]+=cost
        dfs(nx)
dfs(0)
print(*c)

### FIXED CODE ###

from collections import deque

n,q=map(int,input().split())

g=[[] for _ in range(n)]
for i in range(n-1):
    a,b=map(int,input().split())
    g[a-1].append(b-1)
    g[b-1].append(a-1)



c=[0]*n

for j in range(q):
    p,x=map(int,input().split())
    c[p-1]+=x

used=[0]*n
used[0]=1
next=deque([0])

while next:
    v=next.popleft()
    cost=c[v]
    for nv in g[v]:
        if used[nv]:
            continue
        used[nv]=1
        next.append(nv)
        c[nv]+=cost

print(*c)
import math
from functools import reduce

N = int(input())
a = list(map(int,input().split()))

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

res = 0
tmp = reduce(lcm,a)-1
for i in a:
    res += tmp % i
print(res)

### FIXED CODE ###

from fractions import gcd
from functools import reduce

def lcm(x, y):
    return (x * y) // gcd(x, y)

N = int(input())
a = list(map(int,input().split()))

res = 0
tmp = reduce(lcm,a)-1
for i in a:
    res += tmp % i
print(res)
n = int(input())
l = list(map(int,input()))
m = int(input())
sum = sum(l)
copy = sum

for i in range(m):
  sum = copy
  a,b = map(int,input().split())
  sum += b - l[a-1]
  print(sum)

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
m = int(input())
sum = sum(l)
copy = sum

for i in range(m):
  sum = copy
  a,b = map(int,input().split())
  sum += b - l[a-1]
  print(sum)
S=input()
S[3]='8'
print(S)

### FIXED CODE ###

S=input()
print(S[0:3]+'8'+S[4:])
import numpy as np

mod = 10**9 + 7

r1, c1, r2, c2 = map(int, input().split())
f = np.ones((r2 + 1, c2 + 1), dtype=np.int)
g = np.ones((r2 + 1, c2 + 1), dtype=np.int)
for i, j in np.ndindex(r2, c2):
  f[i+1, j+1] = (f[i, j+1] + f[i+1, j]) % mod
print(f[r1:, c2:].sum() % mod)

### FIXED CODE ###

mod = 10**9 + 7

r1, c1, r2, c2 = map(int, input().split())

fact = [1] * (r2 + c2 + 3)
inv = [1] * (r2 + c2 + 3)
inv_fact = [1] * (r2 + c2 + 3)
for i in range(2, r2 + c2 + 3):
  fact[i] = fact[i-1] * i % mod
  inv[i] = -inv[mod % i] * (mod // i) % mod
  inv_fact[i] = inv_fact[i-1] * inv[i] % mod

total = fact[r2 + c2 + 2] * inv_fact[r2 + 1] * inv_fact[c2 + 1] % mod
total -= fact[r1 + c2 + 1] * inv_fact[r1] * inv_fact[c2 + 1] % mod
total -= fact[r2 + c1 + 1] * inv_fact[c1] * inv_fact[r2 + 1] % mod
total += fact[r1 + c1] * inv_fact[r1] * inv_fact[c1] % mod

print(total % mod)
N,A,B = map(int,input().split())
L = []
for i in range(1,N+1):
  k = str(i)
  for j in range(len(k)):
    S = sum(int(k[j]))
    if (A <= S <= B):
      L.append(i)
print(sum(S))

### FIXED CODE ###

N,A,B = map(int,input().split())
L = []
for i in range(1,N+1):
  k = str(i)
  s = 0
  for j in range(len(k)):
    s += int(k[j])
  if (A <= s <= B):
    L.append(i)
print(sum(L))
N=int(input())
count=0
s=[input() for i in range(N)]
n=['a' for t in range(N) for i in range(t+1,N) if s[t].sort==s[i].sort]
print(len(n))

### FIXED CODE ###

N=int(input())
S=[''.join(sorted((input()))) for i in range(N)]
P={}
for i in range(N):
    if S[i] in P:
        P[S[i]]+=1
    else:
        P[S[i]]=0
for i in P.keys():
    if P[i]>=2:
        P[i]=P[i]*(P[i]+1)/2
print(int(sum(P.values())))
(N,M) = input().split()
N = int(N)
M = int(M)
h = list(map(int,input().split()))
y = [0] * N
for i in range (M):
    A,B = map(int,input().split())
    if h[A -1] >= h[B -1]:
        y[B -1] += 1
    if h[B -1] >= h[a -1]:
        y[A -1] += 1
print(y.count(0))

### FIXED CODE ###

N,M = map(int,input().split())
H = list(map(int,input().split()))
c = [0] * N
for i in range(M):
    A,B = map(int,input().split())
    if H[A -1] >= H[B -1]:
        c[B - 1] += 1
    if H[B - 1] >= H[A - 1]:
        c[A - 1] += 1
print(c.count(0))
#coding: utf-8

def yis(z):
    for i in range(1000):
        if i * i > e - z * z * z:
            y = i - 1
            break
    return y


while True:
    e = int(raw_input())
    y = 0
    z = 0
    if e == 0:
        break
    for i in range(100):
        if i * i * i > e:
            z = i - 1
            break
    n = z
    m = e
    for i in range(n + 1):
        y = yis(z)
        m = min(m,e - y * y - z * z * z + y + z)
        z = z - 1
    print m

    

### FIXED CODE ###

#coding: utf-8
import math

def yis(z):
    y = int(math.floor(math.sqrt(e - z * z * z)))
    return y

while True:
    e = int(raw_input())
    y = 0
    z = 0
    if e == 0:
        break
    for i in range(102):
        if i * i * i > e:
            z = i - 1
            break
    n = z
    m = e
    for i in range(n + 1):
        y = yis(z)
        m = min(m,e - y * y - z * z * z + y + z)
        z = z - 1
    print m
x=[int(intput() for _ in range(5))]
k=int(input())
max=max(x)
min=min(x)
if max-min < k:
    print("Yay!")
else:
    print(":(")

### FIXED CODE ###

x=[int(input()) for _ in range(5)]
k=int(input())
max=max(x)
min=min(x)
if max-min <= k:
    print("Yay!")
else:
    print(":(")
N = int(input())

xs, ys, hs = [], [], []
for _ in range(N):
    x, y, h = map(int, input().split())
    xs.append(x)
    ys.append(y)
    hs.append(h)

ok = False
for x in range(101):
    for y in range(101):
        if ok:
            break
        ans = set()
        for i in range(N):
            h = hs[i] + abs(xs[i] - x) + abs(ys[i] - y)
            ans.add(h)

        if len(ans) == 1 and ok2:
            h = ans.pop()
            if h > 0:
                ok = True
                print(x, y, h)

assert ok


### FIXED CODE ###

N = int(input())

xs, ys, hs = [], [], []
for _ in range(N):
    x, y, h = map(int, input().split())
    xs.append(x)
    ys.append(y)
    hs.append(h)

ok = False
for x in range(101):
    for y in range(101):
        if ok:
            break
        cand = []
        for i in range(N):
            h = hs[i] + abs(xs[i] - x) + abs(ys[i] - y)
            if hs[i] == 0:
                cand.append((h, False))
            else:
                cand.append((h, True))

    
        cand2 = set([c[0] for c in cand if c[1]])
        if len(cand2) != 1:
            continue

        assert len(cand2) == 1
        ans = cand2.pop()

        if all([c[0] >= ans for c in cand if not c[1]]):
            print(x, y, ans)
            ok = True





assert ok
A,B = map(str, input().split())
if (A + B)%3 == 0:
  print('Possible')
else:
  print('Impossible')

### FIXED CODE ###

A,B = map(int, input().split())
if (A + B)%3 == 0 or A%3 == 0 or B%3 == 0:
  print('Possible')
else:
  print('Impossible')
import sys

input = sys.stdin.readline


class Node:
    def __init__(self, id):
        self.id = id
        self.node1 = 0
        self.node2 = 0
        self.val = 0

    def set_node(self, node):
        if self.node1 == 0:
            self.node1 = node
        else:
            self.node2 = node


def add_val(node, val):
    global tree
    if node.id == 0:
        return
    node.val += val
    add_val(tree[node.node1], val)
    add_val(tree[node.node2], val)


n, q = map(int, input().split())
tree = [Node(id) for id in range(n + 1)]

for i in range(n - 1):
    a, b = map(int, input().split())
    tree[a].set_node(b)

for i in range(q):
    p, x = map(int, input().split())
    add_val(tree[p], x)

print(*[tree[i].val for i in range(1, n + 1)])


### FIXED CODE ###

import sys

input = sys.stdin.readline


class Node:
    def __init__(self, parent_id=None):
        self.val = 0
        self.parent_id = parent_id


n, q = map(int, input().split())
tree = [Node() for _ in range(n)]

for _ in range(1, n):
    a, b = map(int, input().split())
    tree[b - 1].parent_id = a - 1

for _ in range(q):
    p, x = map(int, input().split())
    tree[p - 1].val += x

for i in range(1, n):
    tree[i].val += tree[tree[i].parent_id].val

print(*[node.val for node in tree])
N, K = map(int,input().split(" "))
A = map(int,input().split(" "))
 
import itertools
 
L = []
 
for x in itertools.combinations(A, 2):
    L.append(x[0]*x[1])
 
L.sort()
 
print(L[K-1])

### FIXED CODE ###

L = map(int,input().split(" "))

if len(set(L)) == 2:
    print("Yes")
else:
    print("No")
MAX = 300000001

N, K = map(int, input().split())
xn = [int(i) for i in input().split()]


def main():
    ans = MAX

    if 0 < xn[0]:
        ans = xn[K - 1]
        print(ans)
        return

    if xn[N - 1] < 0:
        ans = xn[N - K]
        print(ans)
        return

    for i in range(N):
        if xn[i] <= 0 and 0 <= xn[i + K - 1]:
            ans = min(ans,
                      2 * abs(xn[i]) + abs(xn[i + K - 1]),
                      abs(xn[i]) + 2 * abs(xn[i + K - 1]))

    print(ans)
    return


main()


### FIXED CODE ###

MAX = 300000001

N, K = map(int, input().split())
xn = [int(i) for i in input().split()]


def main():
    if 0 <= xn[0]:
        print(xn[K - 1])
        return

    if xn[N - 1] < 0:
        print(abs(xn[N - K]))
        return

    ans = MAX

    for i in range(N):
        if N - 1 < i + K - 1:
            break

        if xn[i] < 0:
            if xn[i + K - 1] < 0 and i + K <= N - 1 and 0 < xn[i + K]:
                ans = min(ans, abs(xn[i]))

            elif 0 <= xn[i + K - 1]:
                ans = min(ans,
                          2 * abs(xn[i]) + abs(xn[i + K - 1]),
                          abs(xn[i]) + 2 * abs(xn[i + K - 1]))

        elif 0 == xn[i]:
            ans = min(ans, xn[i + K - 1])

        elif 0 != i and xn[i - 1] < 0:
            ans = min(ans, xn[i + K - 1])

    print(ans)
    return


main()
s=list(input())
t=list(input())
if len(s)<len(t):print('UNRESTORABLE')
else:
	for i in range(len(s)-len(t)+1):
		for j in range(len(t)):
			if s[i+j] not in ['?',t[j]]:break
		else:
			s[i:i+len(t)]=t
			break
	else:
		print('UNRESTORABLE')
        exit()
print(''.join(s).replace('?','a'))

### FIXED CODE ###

s=list(input())[::-1]
t=list(input())[::-1]
if len(s)<len(t):print('UNRESTORABLE')
else:
	for i in range(len(s)-len(t)+1):
		for j in range(len(t)):
			if s[i+j] not in ['?',t[j]]:break
		else:
			s[i:i+len(t)]=t
			break
	else:
		print('UNRESTORABLE')
		exit()
	print(''.join(s[::-1]).replace('?','a'))
import numpy as np


def getNearestValue(list, num):

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return list[idx]


if __name__ == "__main__":

    X, N = list(map(int, input().split()))
    p = list(map(int, input().split()))
    print(np.sort(p))
    print(getNearestValue(p, X-1))
    for i in range(np.sort(p)):

### FIXED CODE ###

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

p = set(p)
for i in range(200):
    if X - i not in p:
        print(X - i)
        break
    if X + i not in p:
        print(X + i)
        break
def main():
  n=int(input())
  dp=[[0,0,0]]
  for i in range(1,n+1):
    a,b,c=map(int,input().split())
    dp.append([
      dp[i-1][0]+max(b,c),
      dp[i-1][1]+max(a,c),
      dp[i-1][2]+max(a,b)
    ]
  print(max(dp[n]))


### FIXED CODE ###

def main():
  n=int(input())
  dp=[[0,0,0]]
  for i in range(1,n+1):
    a,b,c=map(int,input().split())
    dp.append([max(dp[i-1][1],dp[i-1][2])+a,max(dp[i-1][0],dp[i-1][2])+b,max(dp[i-1][0],dp[i-1][1])+c])
    #print(dp)
  print(max(dp[n]))
if __name__=='__main__':
  main()
N=15
input=input()

masu=[int(r) for r in input.split()]
ans=[]

for i in range(1,N+1,2):

    if masu[i-1]%2==1 and i%2==1:
        ans.append(i)

print(len(ans))

### FIXED CODE ###

N=int(input())
#N=17



input=input()
#input="13 76 46 15 50 98 93 77 31 43 84 90 6 24 14 0 1"
masu=[int(r) for r in input.split()]
ans=[]

for i in range(1,N+1,2):

    if masu[i-1]%2==1:
        ans.append(i)

print(len(ans))
from scipy.special import comb

n = int(input())
a = [0]*n
a = list(map(int, input().split()))
ty=[0]*n

for i in range(0,n):
    ty[a[i]]+=1

s = 0

for i in range(0,n):
    if ty[i]>=2:
        s += comb(ty[i], 2, exact=True)

for k in range(0,n):
    if ty[a[k]]==2:
        print(s-1)
    elif ty[a[k]]>2:
        print(s-comb(ty[a[k]], 2, exact=True)+comb(ty[a[k]]-1, 2,exact=True))
    else:
        print(s)

### FIXED CODE ###

import random


def nC2(n):
    return int(n*(n-1)/2)

n = int(input())

a = [0]*n
a = list(map(int, input().split()))
a = [i-1 for i in a]

ty=[0]*n

for i in range(0, n):
    ty[a[i]]+=1

s = 0

for i in range(0, n):
    if ty[i]>=2:
        s += nC2(ty[i])

for k in range(0, n):
    if ty[a[k]]==2:
        print(s-1)
    elif ty[a[k]]>2:
        print(s-nC2(ty[a[k]])+nC2(ty[a[k]]-1))
    else:
        print(s)
def resolve():
    N = int(input())
    arr = tuple(map(int, input().split()))
    tmp = arr[0]
    counter = 0
    for i in arr:
        if i<=tmp:
            tmp=i
            counter += 1
    print(counter)

if __name__ == "__main__":
    resolve()

### FIXED CODE ###

n, m = map(int, input().split())
if n==m:
	print("Yes")
	exit()
else:
	print("No")
X,Y,A,B,C = map(int,input().split())

p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))

p.sort()
q.sort()
r.sort()

p.reverse()
q.reverse()
r.reverse()

qi = 0
ri = 0

lis = [0]

for i in range(B+C):

    if (qi == Y or qi == B) and ri==C:
        lis.append(float("-inf"))
    elif qi == Y or qi == B:
        lis.append(lis[-1] + r[ri])
        ri += 1
    elif ri == C:
        lis.append(lis[-1] + q[qi])
        qi += 1
    elif q[qi] > r[ri]:
        lis.append(lis[-1] + q[qi])
        qi += 1
    else:
        lis.append(lis[-1] + r[ri])

ans = 0

n = 0
for i in range(X+1):

    if i != 0:
        n += p[i-1]

    ans = max(ans , n + lis[X+Y-i])

print (ans)


### FIXED CODE ###


X,Y,A,B,C = map(int,input().split())

p = list(map(int,input().split()))
q = list(map(int,input().split()))
r = list(map(int,input().split()))

p.sort()
q.sort()
r.sort()

p.reverse()
q.reverse()
r.reverse()

qi = 0
ri = 0

lis = [0]

for i in range(B+C):

    if (qi == Y or qi == B) and ri==C:
        lis.append(float("-inf"))
    elif qi == Y or qi == B:
        lis.append(lis[-1] + r[ri])
        ri += 1
    elif ri == C:
        lis.append(lis[-1] + q[qi])
        qi += 1
    elif q[qi] > r[ri]:
        lis.append(lis[-1] + q[qi])
        qi += 1
    else:
        lis.append(lis[-1] + r[ri])
        ri += 1

#print (lis)
ans = 0

n = 0
for i in range(X+1):

    if i != 0:
        n += p[i-1]

    if len(lis) > X+Y-i:
        ans = max(ans , n + lis[X+Y-i])

print (ans)
N,A,B=map(int,input().split())
ball=('b'*A+'a'*B)*10**9
print(ball.count('b',0,N))


### FIXED CODE ###

N,A,B=map(int,input().split())
if N == (N//(A+B))*(A+B):
    print(N-(N//(A+B))*(B))
elif (N//(A+B))*(A+B)<N <= (N//(A+B))*(A+B)+A:
    print(N-(N//(A+B))*(B))
else:
    print((N//(A+B)+1)*(A))
n=(raw_input())
A=map(int, raw_input().split())
q=(raw_input())
m=map(int, raw_input().split())

def solve(c, m):
  if m == 0:
    return 1
  if c >= n or sum(A)<m:
    return 0
  res = solve(c + 1, m) or solve(c + 1, m - A[c])
  return res

for i range(0,q):
  if solve(0,m[i])==1:
    print "yes"
  else:
    print "no"

### FIXED CODE ###

n=int(raw_input())
A=map(int, raw_input().split())
q=int(raw_input())
m=map(int, raw_input().split())

def solve(j, m):
  if m == 0:
    return 1
  if j >= n or m > sum(A):
    return 0
  res = solve(j + 1, m) or solve(j + 1, m - A[j])
  return res

for i in range(0,q):
  if solve(0,m[i]):
    print "yes"
  else:
    print "no"
N = int(input())
raw = list(map(int, input().split()))

for i in raw:
    cnt = 0
    while i % 2 == 0:
        i //= 2
        cnt += 1
print(cnt)

### FIXED CODE ###

a = input()
num = [int(i) for i in a]
print(sum(num))
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    n = II()
    a = LI()
    print("NO" if sum(map(lambda x: x[0] & 1, a)) & 1 else "YES")
    return


#main
if __name__ == '__main__':
    solve()


### FIXED CODE ###

#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    n = II()
    a = LI()
    print("NO" if sum(map(lambda x: x & 1, a)) & 1 else "YES")
    return


#main
if __name__ == '__main__':
    solve()
A,B = map(int,input().split())
sum = 1
if B == 1:
  print(0)
else:
  for i in range(1,A+1):
    sum = sum + A -1
    if sum >= B:
      break
print(i)

### FIXED CODE ###

A,B = map(int,input().split())
sum = 1
c = 0
if B == 1:
  print(0)
else:
  while sum < B:
    sum = sum + A -1
    c += 1
  print(c)