peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
n = int(input())
b = list(map(int, input().split()))

max_value = b[0] + b[n - 2]
for i in range(n - 2):
    max_value += min(b[i], b[i + 1])
print(max_value)
# Judge status: Wrong Answer
s = input()
s = set(s)
print(len(s))
# Judge status: Wrong Answer
n=int(input())
s=str(input())
s=list(s)
tempw=s.count("W")
ans=n-tempw
cnt=n-tempw
if s[0]=="W":
  ans=ans-1
  cnt=cnt-1
for i in range(1,n):
  if s[i-1]=="W":
    cnt=cnt+1
  if s[i]=="E":
    cnt=cnt-1
  ans=min(ans,cnt)  
print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
height = (1 + (b - a)) * (b - a) / 2
print(int(height - b))
# Judge status: Accepted
input()
aa = [int(i) for i in input().split()]

ans = "APPROVED"
for a in aa:
    if a % 2 == 0 and a % 3 != 0 and a % 5 != 0:
        ans = "DENIED"
        break

print(ans)
# Judge status: Accepted
from itertools import product

n, m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]

for i, j in product(range(n - m + 1), repeat=2):
    if all(a[i + k][j:j + m] == b[k] for k in range(m)):
        print('Yes')
        break
else:
    print('No')
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
    if i == (ans + 1):
        ans += 1
if ans:
    print(N - ans)
else:
    print(-1)
# Judge status: Wrong Answer
import sys
#from collections import deque
input = sys.stdin.buffer.readline

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)
ans = p[:x]
ans[x:x] = q[:y]
ans=sorted(ans,reverse=True)
i = 0
result = 0
for A in ans:
    if A < r[i]:
        result += r[i]
        if i < c - 1:
            i += 1
        continue
    result += A
print(result)
# Judge status: Accepted
n,m=map(int,input().split())
if n%4==0:
  l=m//2+1
else:
  l=m//2
if n%2==0:
  for i in range(l):
    print(i+1,n-i)

  for i in range(m-l):
    print(i+1+l,n-i-l-1)
else:
  for i in range(m):
    print(i+1,n-i)
# Judge status: Accepted
a=''.join(sorted(map(str,input().split())))
print('YES' if a=='557' else 'NO')
# Judge status: Accepted
import sys

def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]


def main():
    N = II()
    P = LI()
    ans = 0
    min = N+1

    for i in range(N):
        if P[i]<min:
            ans += 1
            min = P[i]

    print(ans)

if __name__ == "__main__":
	main()
# Judge status: Accepted
n = int(input())

alphabet_cnt = [[0] * n for i in range(26)]
# [listA, listB, listC, ..., listZ]
# listA = [0, 1, 3, 2, 1, 4, ...] -> the number of A in Si (only min val is needed)
alphabet = list("abcdefghijklmnopqrstuvwxyz")
alphabet_map = dict(zip(alphabet, list(range(26))))

for i in range(n):
  si = input()
  for j in range(len(si)):
    alphabet_cnt[alphabet_map[si[j]]][i] += 1

alphabet_intersect = [min(alp) for alp in alphabet_cnt]
print("".join([alphabet[idx] * cnt for idx, cnt in enumerate(alphabet_intersect)]))
# Judge status: Accepted
n,m = map(int, input().split())
num_list = []
for i in range(n):
  num_list.append(list(map(int,input().split())))
check_list = []
for i in range(m):
  check_list.append(list(map(int,input().split())))

for i in range(n):
  d = 10**9
  h = 0
  for j in range(m):
    if d > (abs(num_list[i][0]-check_list[j][0])+abs(num_list[i][1]-check_list[j][1])):
      d = abs(num_list[i][0]-check_list[j][0])+abs(num_list[i][1]-check_list[j][1])
      h = j+1
  print(h)
# Judge status: Wrong Answer
N = int(input())
S = input()

w = S.count(".")
bl = S.count("#")

cnt = 0
for i in S[::-1]:
    if i != "#":
        break
    cnt += 1
bl -= cnt
cnt = 0
for i in S:
    if i != ".":
        break
    cnt += 1
w -= cnt
print(min(w, bl))
# Judge status: Accepted
def mi():
    return map(int, input().split())

def ii():
    return int(input())

def main():
    A, B, C = mi()
    m = max(A, B, C)
    s = sum([A, B, C])
    cnt = 0
    while True:
        if s%3==0 and s>=3*m:
            break
        s += 2
        cnt += 1
    print(cnt)

if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
XL = []
for i in range(N):
    XL.append(list(map(int, input().split())))
XL = list(map(lambda x: [x[0] - x[1], x[0] + x[1]], XL))
 
XL = sorted(XL, key=lambda x: x[1])

r = XL[0][1]
cnt = 1
for i in range(1, N):
    if XL[i][0] >= r:
        r = XL[i][1]
        cnt += 1
print(cnt)
# Judge status: Wrong Answer
s = int(input())
v = 1e9
x=(v-s%v)%v
y=(s+x)/v
print("0 0 1000000000 1 ",x,y)
# Judge status: Accepted
def actual(A, B):
    return (A + B) % 24

A, B = map(int, input().split())
print(actual(A, B))
# Judge status: Accepted
n,x = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
for i in range(n-1):
    if a[i] <= x:
        if a[i]+a[i+1] <= x: continue
        else:
            ans += (a[i]+a[i+1])-x
            a[i+1] -= (a[i]+a[i+1])-x
    else:
        ans += a[i]-x + a[i+1]
        a[i], a[i+1] = x, 0
if a[-1] > x: ans += a[-1]-x
print(ans)
# Judge status: Accepted
print('YES') if input()[::-1]==input() else print('NO')
# Judge status: Accepted
N,M=list(map(int, input().split()))
print(N*(N-1)//2+M*(M-1)//2)
# Judge status: Wrong Answer
n = int(input())
ans = 0
if n % 2 != 0:
    print(0)
    exit()
denominator = 10
while n > denominator:
    ans += n//denominator
    denominator *= 5

print(ans)
# Judge status: Wrong Answer
import re
print("Yes" if re.match("^(dream|dreamer|erase|eraser)+$", input()) else "No")
# Judge status: Accepted


S = input()
N = int(S.split(" ")[0])
M = int(S.split(" ")[1])


lArr = []
rArr = []
for i in range(M):
    S = input()
    l1 = int(S.split(" ")[0])
    r1 = int(S.split(" ")[1])
    lArr.append(l1)
    rArr.append(r1)

lArr.sort()
rArr.sort()

l1 = max(lArr)
r1 = min(rArr)

if r1 < l1:
    print(0)
else:
    print(r1 - l1 + 1)
# Judge status: Wrong Answer
x = int(input())
 
if x % 11 == 0:
    ans = x // 11 * 2
else:
    if x % 11 < 6:
        ans = x // 11 * 2 + 1
    else:
        ans = x // 11 * 2 + 2

print(ans)
# Judge status: Wrong Answer
K,X=map(int,input().split())

for i in range(X-K+1,X+K-1):
  print(i)
# Judge status: Accepted
n = int(input())
l = [[0 for j in range(9)]for i in range(9)]
for i in range(1,n+1):
  if i % 10 != 0:
    s_i = str(i)
    l[int(s_i[-1])-1][int(s_i[0])-1] += 1

ans = 0
for i in range(9):
  for j in range(9):
    ans += l[i][j] * l[j][i]
print(ans)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
S=0
for a in A:
  S ^= a

b = [S^a for a in A]
print(b)
# Judge status: Wrong Answer
n, w = map(int, input().split())
g = []
for i in range(n):
    g.append(list(map(int, input().split())))
m = [[0 for j in range(w+1)]for i in range(n+1)]
for i in range(n+1):
    for j in range(w+1):
        if j-g[i-1][0] < 0:
            m[i][j] = m[i-1][j]
        else:
            m[i][j] = max(m[i-1][j], m[i-1][j-g[i-1][0]]+g[i-1][1])
print(m[n][w])
# Judge status: Accepted
s, t = map(str, input().split())
print(''.join([t, s]))
# Judge status: Accepted
import itertools

N = int(input())
A = [int(input()) for _ in range(N)]

a = 1
for i, _ in enumerate(range(N), 1):
  a = A[a - 1]
  if a == 2:
    break
if a == 2:
  print(i)
else:
  print(-1)
# Judge status: Accepted
N,K=map(int,input().split())
A=list(map(int,input().split()))
m= [0 for i in range(200001) ]
for i in range(N):
  m[A[i]] += 1
m.sort(reverse=True)
ans = 0
for i in range(K,N):
  if ( m[i] == 0 ):  break
  ans += m[i]
print(ans)
# Judge status: Wrong Answer
def resolve():
    n = int(input())
    a = list(map(int, input().split()))

    mod = 10**9+7
    s = 0
    sq = 0
    for i in range(n):
        s += a[i]
        sq += (a[i])**2
        s %= mod
        sq %= mod

    s2 = (s**2) %mod
    ans = s2-sq
    if ans < 0:
        ans += mod
    print((ans//2)%mod)
resolve()
# Judge status: Accepted
S = input()
if S.find("A") == -1 or S.find("B") == -1:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
N = int(input())
C, S, F = zip(*[tuple(map(int, input().split())) for _ in range(N-1)])
S = list(s for s in S) + [0]
for i in range(N-1):
    for j in range(i, N-1):
        S[i] = max(S[i], S[j])
        while S[i] % F[j]:
            S[i] += 1
        S[i] += C[j]
print(*S, sep="\n")
# Judge status: Wrong Answer
n, m = map(int,input().split())

ans = []
for i in range(m + 1):
    if n % 2 == 0 and i == 0:continue
    if n % 2 == 1 and i == m:continue
    temp = (i + 1, n - i)
    ans.append(temp)

for i in ans:
    print(*i)
# Judge status: Accepted
a=input()
b=0
c=0
for i in range(len(a)):
  if a[i]=="A" or a[i]=="C" or a[i]=="G" or a[i]=="T":
    b=b+1
    if c<b:
      c=b
  if a[i]!="A" and a[i]!="C" and a[i]!="G" and a[i]!="T":
    b=0
print(c)
# Judge status: Wrong Answer
n = int(input())
l = [int(_) for _ in input().split()]

M = 10**3+1

le = [0] * M
for i in range(n):
    le[l[i]] += 1

ans = 0
for a in range(1, M-2):
    for b in range(a, M-1):
        for c in range(b, min(a+b, M)):
            ans += (le[a] * le[b] * le[c])
print(ans)
# Judge status: Accepted
import sys

N,M = (int(x) for x in input().split())
li = []
for i in range(M):
  a,b = (int(x) for x in input().split())
  li.append([i,a,b,""])

li.sort(key=lambda x: x[2])

cnt = [1]*N
for i in range(M):
  li[i][3] = str(li[i][1]).zfill(6) + str(cnt[li[i][1]-1]).zfill(6)
  cnt[li[i][1]-1] += 1
  
li.sort(key=lambda x: x[0])
for i in range(M):
  print(li[i][3])
# Judge status: Wrong Answer
N=int(input())
if N>=1000:
    print('ABD')
else:
    print('ABD')
# Judge status: Accepted
N = int(input())
p = list(map(int, input().split()))
cnt = 0
for i in range(N):
  cnt += p[i] != i + 1
if cnt == 0 or cnt == 2:
  print('YES')
else:
  print('NO')
# Judge status: Wrong Answer
N = int(input())
A = [int(i) for i in input().split()]

cash=1000
stock=0
for i in range(N-1):
  if A[i] < A[i+1]:
    stock=cash//A[i]
    cash=cash%A[i]
  elif A[i] > A[i+1]:
    cash+=A[i]*stock
    stock=0

cash+=A[N-1]*stock
print(cash)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 12 22:01:05 2020

@author: H_Hoshigi
"""

import math

K = 200#int(input())
answer = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        gcd_a_b = math.gcd(a, b)
        for c in range(1, K+1):
            answer += math.gcd(gcd_a_b, c)
print(answer)
# Judge status: Wrong Answer
a=[int(i) for i in input().rstrip().split()]
print(round(sum(a)/len(a)))
# Judge status: Wrong Answer
N = int(input())
import numpy as np
A = np.array(list(map(int, input().split())))
 
ans = 0
while not np.any(A % 2 == 0):
  A = A / 2
  ans += 1
print(ans)
# Judge status: Accepted
x,n,t = map(int,input().split(" "))
cnt =0
while x > 0:
    x -= n
    cnt += 1
print(cnt * t)
# Judge status: Wrong Answer
from collections import Counter
from scipy.misc import comb
N = int(input())
A = [int(x) for x in input().split()]
C = Counter(A)
def banned_count(seq):
    for i in range(N):
        count = 0
        C[A[i]] -= 1
        for j in C.values():
            if j >= 2:
                count += comb(j, 2)
        print(int(count))
        C[A[i]] += 1
banned_count(A)
# Judge status: Accepted
import sys

N = int(input())

for i in range(N//4+1):
    if (N-4*i)%7 == 0:
        print("Yes")
        sys.exit()

print("No")
# Judge status: Wrong Answer
date = input()

List = ['SAT', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SUN']

for i in range(len(List)):
    if date == List[i]:
        print(i+1)
# Judge status: Accepted
x,y=map(int,input().split())
if x<10 and y<10:
	print(x*y)
else:
	print(-1)
# Judge status: Accepted
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    x = list(map(int, input().split()))
    print(len(set(x)))
    
if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())

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

s=list(set(a))
if len(a)==len(s):
    print('YES')
else:
    print('NO')
# Judge status: Accepted

n = int(input())
y = list(map(int, input().split(" ")))
s = 1
hoge = False
for i in y:
    if i ==0:
        print(0)
        hoge = True

def f():
    s = 1
    for i in y:
        s *= i
        if s>10**18:
            print(-1)
            return
    print(s)
if not hoge:
    f()
# Judge status: Accepted
import sys
from collections import defaultdict
input = sys.stdin.readline

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

n = I()
d = defaultdict(int)
for i in range(n):
    temp = I()
    d[temp] += 1
ans = 0
for i in d.values():
    if i % 2 == 1:
        ans += 1
        
print(ans)
# Judge status: Accepted
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 0

for a in range(A+1):
  for b in range(B+1):
    for c in range(C+1):
      money = 500 * a + 100 * b + 50 * c
      if money == X:
        ans += 1

print(ans)
# Judge status: Wrong Answer
n,m = map(int, input().split())
a = list(map(int, input().split()))
import heapq
a = list(map(lambda x:x*(-1), a))
heapq.heapify(a)
for _ in range(m):
    num = heapq.heappop(a)
    heapq.heappush(a,num//2)
a = list(a)
print(sum(a)*(-1))
# Judge status: Accepted
n = int(input())
train = [list(map(int, input().split())) for i in range(n-1)]

for i in range(n-1):
    ans = 0
    for j in range(i,n-1):
        if ans <=train[j][1]:
            ans = train[j][1]+ train[j][0]
        else:
            if ans%train[j][2]==0:
                ans += train[j][0]
            else:
                ans = train[j][0] + (ans//train[j][2]+1)*train[j][2]
    print(ans)

print(0)
# Judge status: Accepted
A, B, C, D = map(int, input().split())

ans = max(0, min(B, D) - max(A, C))

print(ans)
# Judge status: Accepted
INF = 1000000007
n = int(input())

ans = 1


for i in range(1,n+1):
  ans = ans * i % INF
  
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
red = {1, }
l = [1 for _ in range(n)]
for _ in range(m):
    x, y = map(int, input().split())
    l[x - 1] -= 1
    l[y - 1] += 1
    if x in red:
        red.add(y)
        if l[x - 1] == 0:
            red.discard(x)
print(len(red))
# Judge status: Accepted
N,M=map(int,input().split())
A=[input() for i in range(N)]
B=[input() for i in range(M)]
judge=any([line[j:j+M] for line in A[i:i+M]]==B for i in range(N-M+1) for j in range(N-M+1))
print("Yes" if judge else "No")
# Judge status: Wrong Answer
if __name__ == '__main__':
	X, Y, A, B, C = map(int, input().split())
	p = [int(a) for a in input().split()]
	q = [int(a) for a in input().split()]
	r = [int(a) for a in input().split()]

	p.sort(reverse=True)
	q.sort(reverse=True)
	


	P = p[0:X]
	Q = q[0:Y]
	Z = min(C,X+Y)
	R = r[0:Z]

	s = P+Q+R

	s.sort(reverse=True)

	S = s[0:X+Y]

	ans = sum(S)

	print(ans)
# Judge status: Accepted
n = int(input())
s = input()
t = "".join([chr(ord("A") + (ord(i)-ord("A")+n)%26) for i in s])
print(t)
# Judge status: Accepted
def main():
    x = int(input())
    ans = 10 - int(x // 200)
    print(int(ans))


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
A = [list(map(int, input().split())) for i in range(3)]
N = int(input())
b = []
for i in range(N):
	b.append(int(input()))
	
yoko = A
tate = [[], [], []]
for row in A:
	for i in range(3):
		tate[i].append(row[i])
naname = [[A[0][0], A[1][1], A[2][2]]]

all = yoko + tate + naname



for kumi in all:
	chk = 0
	for i in range(3):
		if kumi[0] in b:
			chk += 1
	if chk == 3:
		print("Yes")
		break

if chk == 0:
	print("No")
# Judge status: Accepted
k,x = [int(x) for x in input().split()]
if k*500>=x:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N, Q = map(int, input().split())
S = input()
cumulative = [0] * (N+1)
for i in range(N):
  if S[i:i+2] == "AC":
    cumulative[i+2] = cumulative[i+1] + 1

for _ in range(Q):
  start, end = map(int, input().split())
  ans = cumulative[end] - cumulative[start-1]
  if start > 1 and S[start-2:start] == "AC":
    ans -= 1
  print(ans)
# Judge status: Accepted
N=int(input())
A=map(int,input().split())
i=1
for a in A:
  if a==i: i+=1
i-=1
print(N-i if i>0 else -1)
# Judge status: Accepted
x = int(input())
primes = [i for i in range(2 * x)]
for i, b in enumerate(primes):
    if i < 2 or b == 0:
        continue
    else:
        m = (2 * x - 1) // i
        if m > 1:
            for j in range(2, m + 1):
                primes[i * j] = 0
print(min([i for i in primes if i >= x]))
# Judge status: Accepted
x, a, b = map(int, input().split())
if b - a <= 0:
  print('delicious')
elif b - a <= x:
  print('safe')
else:
  print('dangerous')
# Judge status: Accepted
import numpy as np
N, D = map(int,input().split())
LX = [list(map(int, input().split())) for i in range(N)]

cnt=0
for i in range(N-1):
    for j in range(i+1,N):
        LXP = np.array(LX[i])
        LXQ = np.array(LX[j])
        ans = (float(np.sqrt(sum((LXP - LXQ) ** 2))))
        if ans.is_integer():
            cnt += 1

print(cnt)
# Judge status: Accepted
N = int(input())
K = int(input())
X = int(input())
Y = int(input())
print(X * min(K,N) + max(N-K,0) * Y )
# Judge status: Wrong Answer
a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if b<=c:
  if a+b>=c:
    print(0)
  else:
    print(c-b)
else:
  if a+c>=b:
    print(0)
  else:
    print(b-c)
# Judge status: Accepted
X, Y = map(int, input().split())
for i in range(X + 1):
    j = X - i
    if i * 2 + j * 4 == Y:
        print("Yes")
        break
else:
    print("No")
# Judge status: Accepted
N = int(input())
# N, X = [int(i) for i in input().split()]

if N%2:
    print(N//2 + 1)
else:
    print(N//2)
# Judge status: Wrong Answer
X = int(input())

C = 0
D = 0

while True:
    if X > 500:
        C = X // 500
        P = 500 * C
        X = X - P
    elif X > 5:
        D = X // 5
        L = 5 * D
        X = X - L
    else:
        break

total = (1000 * C) + (5 * D)

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

ans = 0
for i in range(2, int(N**0.5)+1):
    cnt = 0
    while N%i == 0:
        N /= i
        cnt += 1
    a = 0
    b = 0
    for j in range(1, cnt+1):
        a += j
        if a > cnt:
            break
        b += 1    
    ans += b

if N == 1:
    print(0)
elif ans == 0:
    print(1)
else:
    print(ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
k=int(input())

count=0
while a>=b:
    b=b*2
    count+=1

con=0
while b*count>=c:
    c=c*2
    con+=1

total=con+count

if total<=k:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
target_a, target_b = list(map(str, input().split()))
a, b = map(int, input().split())
target = input('')
list_target_a = list(target_a)
list_target_b = list(target_b)
list_target = list(target)

if len(list_target) == len(list_target_a):
    a -= 1
elif len(list_target) == len(list_target_b):
    b -= 1

print(a, b)
# Judge status: Wrong Answer
n,c,k = [int(x) for x in input().split()]
t = [int(input()) for _ in range(n)]
t.sort()
bus = c
f_bus = 0
ans = 0
for i in range(n):
    if t[i] - f_bus >= k or bus == 0:
        ans += 1
        f_bus = t[i]
        bus = c-1
    else:
        bus -= 1

if bus != c:
    ans += 1
print(ans)
# Judge status: Wrong Answer
from collections import deque

N = int(input())
H = deque(map(float, input().split()))

prev = H.popleft()

if N == 1:
    print('Yes')
    exit()

for i in range(N-2):
    cor = H.popleft()
    if prev - cor < -1:
        print('No')
        exit()
    prev = cor

cor = H.popleft()

if cor - prev < 0:
    print('No')
    exit()

print('Yes')
# Judge status: Accepted
N,K=map(int,input().split())
A=list(map(int,input().split()))

for i in range(K,N):
    if A[i]>A[i-K]:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
# 入力
a, b = map(int, input().split())

# 処理&出力
if a == b:
    print('Draw')
elif a == 1:
    print('Alice')
elif b == 1:
    print('Bob')
elif a > b:
    print('Alice')
elif b > a:
    print('Bob')
# Judge status: Accepted
k, n = map(int, input().split())
a = list(map(int, input().split()))
root = []
ans = 0

for i in range(0, n-1):
    x = a[i+1] - a[i]
    root.append(x)

y = a[0] + k - a[n-1]
root.append(y)

for i in root:
    ans += i

ans -= max(root)
print(ans)
# Judge status: Accepted
def comb(n, m, p=10**9+7):
    if n < m:
        return 0
    if n < 0 or m < 0:
        return 0
    m = min(m, n-m)
    top = bot = 1
    for i in range(m):
        top = top*(n-i) % p
        bot = bot*(i+1) % p
    bot = pow(bot, p-2, p)
    return top*bot % p


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

j = 2*x-y
if j % 3:
    print(0)
    exit()
j //= 3
i = x - 2*j
if i < 0 or j < 0:
    print(0)
    exit()

ans = comb(i+j, i)
print(ans)
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
An = 0
for i in range(N):
    if (i+1)%2 == 1:
        if A[i]%2 == 1:
            An +=1
print(An)
# Judge status: Accepted
n,d= map(int,input().split())
k = 2 * d + 1
print( (n+k-1)//k)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().strip().split()))

B=[-1 for n in range(N)]
for n in range(len(A)):
    B[A[n]-1]=n+1

print(" ".join(list(map(str,B))))
# Judge status: Accepted
a=[]
for i in range(3):
  *x,=map(int,input().split())
  a+=x
n=int(input())
b=[]
for i in range(n):
    b.append(int(input()))
ans=[False for _ in range(9)]
for i in b:
    for j in a:
        if i==j:
            ans[a.index(i)]=True
if all(ans[0:3]) or all(ans[3:6]) or all(ans[6:9]):
    print("Yes")
elif all(ans[0:7:3]) or all(ans[1:8:3]) or all(ans[2:9:3]):
    print("Yes")
elif all(ans[0:5:4]) or all(ans[2:7:2]):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import sys
import os

def file_input():
    f = open('ABC160/input.txt', 'r')
    sys.stdin = f

def main():
    #file_input()
    # int(input())
    N,X,Y=map(int, input().split())

    out=[0]*(N-1)

    for i in range(1,N):
        for j in range(i+1,N+1):
            out[min(j-i,abs(j-Y)+1+abs(X-i),abs(j-X)+1+abs(i-Y))-1]+=1

    [print(x) for x in out]

if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
  s = input()
  if s == 'AC':
    c0 += 1
  elif s == 'WA':
    c1 += 1
  elif s == 'TLE':
    c2 += 1
  elif s == 'RE':
    c3 += 1
print('AC x', c0)
print('WA x', c1)
print('TLE x', c2)
print('RE x', c3)
# Judge status: Accepted
N = input()
Ans = 0
for i in range(len(N)):
    Ni = int(N[i])
    Ans = (Ans+Ni)%9
if Ans != 0:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
from collections import defaultdict
import math

N = int(input())

d = defaultdict(int)
for i in range(2, int(math.sqrt(N)) + 1):
    while N % i == 0:
        d[i] += 1
        N //= i
if N > 1:
    d[N] = 1

ans = 0
for v in d.values():
    k = 1
    while k <= v:
        ans += 1
        v -= k
        k += 1
print(ans)
# Judge status: Wrong Answer
from decimal import Decimal, ROUND_HALF_UP

# input
cook_time = []
append = cook_time.append

for i in range(5):
    append(int(input()))

# check
cook_time.sort(key=lambda x: int(Decimal(x).quantize(Decimal("1E1"), rounding=ROUND_HALF_UP)) - x)
res = 0
for c in cook_time:

    if res % 10 != 0:
        res = int(Decimal(res).quantize(Decimal("1E1"), rounding=ROUND_HALF_UP))

    print(c, res)

    res += c

print(res)
# Judge status: Accepted
x = input()

t = 0
s = 0

for i in x:
    if i == 'S':
        t += 1
    else:
        if t > 0:
            t -= 1
        else:
            s += 1

print(s+t)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
mod = 10*9+7
from fractions import gcd

l = a[0]
for i in range(n):
  l = l*a[i]//gcd(l,a[i])

b = [0]*n
ans = 0
for i in range(n):
  b[i] = l//a[i]
  ans += b[i]%mod

print(ans)
# Judge status: Accepted
a,b,c = [int(s) for s in input().split(" ")]
a,b = b,a
a,c = c,a
print("{} {} {}".format(a,b,c))