peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
X=input()
q = []
for x in X:
    if x=='S':
        q.append(x)
    else:
        if len(q)==0 or q[-1]=='T':
            q.append(x)
        else:
            q.pop()
print(len(q))
# Judge status: Wrong Answer
n=int(input())
print(((n//1000)+1)*1000-n)
# Judge status: Accepted
from bisect import *
n = int(input())
A = list(map(int,input().split()))
s = {}
# d = {}
ans = 0
for i,a in enumerate(A):
    if a+i not in s.keys():s[a+i] = 0# []
    # s[a+i].append(i)
    s[a+i] += 1
    if i-a not in s:continue
    ans += s[i-a]
    # if i-a not in d.keys():d[i-a] = []
    # d[i-a].append(i)
print(ans)
# Judge status: Accepted
#!/usr/bin/env python3
A = sorted([int(s) for s in input().split()])[::-1]
print(A[0]*10 + A[1] + A[2])
# Judge status: Accepted
from collections import Counter
n = int(input())
d = list(map(int, input().split()))
mod = 998244353
if d[0] != 0:
    print(0)
else:
    a = Counter(d)
    ans = 1
    if a[0] > 1:
        print(0)
    else:
        for i in range(1, max(d)+1):
            ans *= a[i-1]**a[i]
            ans %= mod
        print(ans)
# Judge status: Wrong Answer
n,m = list(map(int,input().split()))
count = 0
if 2*n <= m:
  count += n
  m = m - 2*n
  n = 0

count += m//4

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

x=n//11
y=n%11
if y==0:
  y=0
elif y<7:
  y=1
else:
  y=2

print(x*2+y)
# Judge status: Accepted
a, b, c = map(int, input().split())


for i in range(10000):
    if (a*i)%b == c:
        print("YES")
        exit()

print("NO")
# Judge status: Accepted
n,a,b=map(int,input().split())

count=0
m=n//(a+b)
l=n%(a+b)

if l==0:
    print(m*a)
elif l>a:
    print(m*a+a)
else:
    print(m*a+l%a)
# Judge status: Accepted
N,K=map(int,input().split())
print(min(1,N%K))
# Judge status: Wrong Answer
k,x = map(int,input().split())
K = 500*k
if x > k:
    print("No")

else:
    print("Yes")
# Judge status: Accepted
s = int(input())
L = s//100
R =s%100

if 1 <= L <=12:
    if 1<= R <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1<= R <=12:
        print('YYMM')
    else:
        print('NA')
# Judge status: Wrong Answer
n, k = map(int, input().split())
i = 1
r = 1
while True:
    i+=1
    if n - k**r > 0:
        n -= k ** r
    else:
        if k > n:
            i = 1
        break
    r+=1
print(i)
# Judge status: Wrong Answer
l = int(input())
if l%3 == 0:
    print((l/3)**3)
elif l%3 == 1:
    print((l/3)*(l/3)*(l/3 + 1))
else:
    print(((l/3)*(l/3 + 1)*(l/3 + 1)))
# Judge status: Accepted
n = int(input())
p = [int(i) for i in input().split()]
q = [int(i) for i in input().split()]

# 順列の作成
import itertools
l = [i for i in range(1,n+1)]
ll = itertools.permutations(l)
for i,v in enumerate(ll):
    if list(v) == p:
        pi = i + 1
    if list(v) == q:
        qi = i + 1

ans = abs(pi - qi)
print(ans)
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a >= 8 or b >= 8: print(":(")
else: print("Yay!")
# Judge status: Accepted
n,k,q=map(int, input().split())
score=[0]*(n+1)
for i in range(q):
    tmp=int(input())
    score[tmp]+=1

for i in range(1,len(score)):
    if k+score[i]-q>0:print("Yes")
    else:print("No")
# Judge status: Accepted
S=input()


nagasa=len(S)
count=0
for i in range(nagasa):
    if (i+1)%2==1:    
        if S[i]=="R" or S[i]=="U" or S[i]=="D":
            count+=0
        else:
            print("No")
            exit()
    else:
        if S[i]=="L" or S[i]=="U" or S[i]=="D":
            count+=0
        else:
            print("No")
            exit()
print("Yes")
# Judge status: Accepted
V = list(map(int, input().split()))
V.sort()
L = V[2] // 2
print(V[0] * V[1] * (V[2] - L - L))
# Judge status: Accepted
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def main():
    N, X, *xn = map(int, open(0).read().split())
    ans = abs(X - xn[0])
    for x in xn:
        df = abs(X - x)
        if df % ans:
            ans = gcd(ans, df)
    print(ans)
    return


main()
# Judge status: Accepted
str_hi = input()
hi_num = int(len(str_hi) / 2)

if "hi" * hi_num == str_hi:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
n_1 = 0

a = list(str(input()))
print(a)
for i in a:
    if i == "1":
        n_1 += 1

print(n_1)
# Judge status: Accepted


c = input()

if c == "a":
    print("vowel")
elif c == "i":
    print("vowel")
elif c == "u":
    print("vowel")
elif c == "e":
    print("vowel")
elif c == "o":
    print("vowel")
else:
    print("consonant")
# Judge status: Accepted
N = str(input())
if int(N)%9 != 0: print("No")
else:
    if int(N) == 0 :print("Yes")
    else:
        sum = 0
        for ki_tu in N:
           sum += int(ki_tu)
        if sum%9 == 0: print("Yes")
        else: print("No")
# Judge status: Accepted
import sys
input = sys.stdin.readline

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

def main():
    mod=10**9+7
    N=I()
    a=LI()+[10**10]
    ans=0
    now=-1
    cnt=0
    for i in range(N+1):
        if a[i]>now:
            ans=max(ans,cnt)
            cnt=0
        else:
            cnt+=1
        now=a[i]
        
    print(ans)
        

main()
# Judge status: Accepted
o = input()
e = input()
password = ""

for i in range(len(o)):
    password += o[i]
    if len(e) > i:
        password += e[i]

print(password)
# Judge status: Accepted
import sys
input = sys.stdin.readline
N,W= map(int,input().split())
ans=[[0 for e in range(W+1)] for f in range(N+1)]
for i in range(N):
 w,v=map(int,input().split())
 for k in range(0,w):
  ans[i+1][k]=ans[i][k]
 for j in range(w,W+1):
  ans[i+1][j]=max(ans[i][j-w]+v,ans[i][j])
print(max(ans[N]))
# Judge status: Accepted
N, A, B = map(int, input().split())
if B < A:
    print(0)
elif A == B:
    print(1)
else:
    if N == 1:
        print(0)
    else:
        print((B*(N-1)+A) - (A*(N-1)+B) + 1)
# Judge status: Wrong Answer
n = int(input())
tmp = 10
ans = 0
while tmp < n:
    ans += n//tmp
    tmp *= 5
print(ans)
# Judge status: Wrong Answer
# coding: utf-8
N = int(input())
li = [True for _ in range(0, 10**6 + 1)]
A = list(map(int, input().split()))
A.sort()
ans = 0
for i in range(N):
    if li[A[i]]:
        ans += 1
    else:
        continue
    for j in range(A[i], 10**6 + 1, A[i]):
        li[j] = False
ans -= len(A) - len(set(A))
if N == 1:
    ans = 0
print(max(0, ans))
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
t = sum(b)-sum(a)
res=0
for i in range(n):
  if a[i]>=b[i]:
    res += a[i]-b[i]
  else:
    res += (b[i]-a[i]+1)//2
if res > t:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
a, b, t = map(int, input().split())
time = t + .5
totaltime = t // a
totalbis = totaltime * b
print(totalbis)
# Judge status: Accepted
Cube = [int(i) for i in input().split(" ")]
# 一番長い辺で切れば断面の数は最小
L = max(Cube)
plane = [i for i in Cube if i!=L]
if len(plane)==0:
    A = L
    B = L
elif len(plane)==1:
    A = plane[0]
    B = L
else:
    A,B = map(int,plane)
print(abs((A*B*(L//2))-(A*B*(L-(L//2)))))
# Judge status: Accepted
def rec(S,depth):
    if depth == 0:
        print(S)
        return
    else:
        list_mozi=list(dict.fromkeys(list(S)))
        list_mozi.sort()
        for j in range(len(list_mozi)):
            rec(S+list_mozi[j],depth-1)
        rec(S+chr(ord(list_mozi[len(list_mozi)-1])+1),depth-1)

N=int(input())
rec("a",N-1)
# Judge status: Accepted
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))

x = 1
ans = 1
while A[x-1] != 2:
    x = A[x-1]
    ans += 1
    if ans == 10**5:
        ans = -1
        break
    
print(ans)
# Judge status: Wrong Answer
import math

n=int(input())
s=[list(map(int,input().split())) for i in range(n)]

print(s)

dist=0
a=math.factorial(n)
for i in range(n):
  for j in range(i+1,n):
    dist+=math.sqrt((s[i][0]-s[j][0])**2+(s[i][1]-s[j][1])**2)
print(dist*2/n)
# Judge status: Wrong Answer
x,y=map(int,input().split())
A=[1,3,5,7,8,10,12]
B=[4,6,9,11]
C=[2]

while True:
    for l in A,B,C:
        if x in l and y in l:
            print('Yes')
            break
    break    
    print('No')
    break
# Judge status: Accepted
# 各数値の取得
A,B = map(int,input().split())

# 開始時間の計算と出力
start = A + B
if start < 24:
    print(start)
else:
    start = start - 24
    print(start)
# Judge status: Accepted
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N, M, X, Y = map(int, readline().split())
    x = list(map(int, readline().split()))
    y = list(map(int, readline().split()))

    def judge():
        for Z in range(X + 1, Y + 1):
            if all(p < Z for p in x) and all(p >= Z for p in y):
                return True
        return False

    if judge():
        print("No War")
    else:
        print("War")


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
A,B,K = map(int,input().split())
for i in range(K):
  print(A+i)
for i in range(K-1,-1,-1):
  print(B-1)
# Judge status: Accepted
#a以上のbの倍数の最小値
def baisu(a,b):
  if a%b==0:
    return a
  else:
    return ((a//b)+1)*b
C=list()
S=list()
F=list()
N=int(input())
for i in range(N-1):
  c,s,f=map(int,input().split())
  C.append(c)
  S.append(s)
  F.append(f)
L = [[0 for j in range(N)] for i in range(N)]
for i in range(N-1):
  L[i][i]=S[i]
  for j in range(i+1,N):
    L[i][j]=baisu(max(L[i][j-1],S[j-1]),F[j-1])+C[j-1]
  print(L[i][-1])
print(0)
# Judge status: Accepted
X, K, D = map(int, input().split())

if abs(X) - K * D < 0:
    d = abs(X) // D
    if (K - d) % 2 == 0:
        print(abs(abs(X) - d * D))
    else:
        print(abs(abs(X) - (d+1) * D))
else:
    print(abs(X) - K * D)
# Judge status: Accepted
N, K = map(int,input().split())
d  = list(map(int,input().split()))

price = N

flag = "like"
ans_flag = 0

while ans_flag == 0:
  for i in range(len(str(price))):
    if int(str(price)[i]) in d:
      flag = "dislike"
  if flag == "dislike":
    price +=1
    flag ="like"
  else:
    ans_flag = 1
print(price)
# Judge status: Accepted
n=input()
i=1
while (i*i)<=int(n):
      i=i+1
m=(i-1)*(i-1)
print(m)
# Judge status: Wrong Answer
n,a,b = map(int,input().split())
if n == 1 :
  print(1)
else:
  if (b-a) >= 1:
    print((b+b+a)-(b+a+a)+1)
  else:
    print(0)
# Judge status: Wrong Answer
N = int(input())
csf = [list(map(int, input().split())) for i in range(N - 1)]

for i in range(N):
    ans = 0
    for j in range(i, N-1):
        c, s, f = csf[j]
        if ans <= s:
            ans += s
        else:
            if ans % f == 0:
                pass
            else:
                ans = (ans // f + 1) * f
        ans += c
    print(ans)
# Judge status: Accepted
from fractions import gcd
n = int(input())
a = list(map(int, input().split()))

l = [0] * (n+1)
r = [0] * (n+1)
for i in range(n):
	l[i+1] = gcd(l[i],a[i])
	r[n-1-i] = gcd(r[n-i],a[n-1-i])

ans = 0
for i in range(n):
	ans = max(ans, gcd(l[i],r[i+1]))
print (ans)
# Judge status: Wrong Answer
a,b,c=map(int,input().split('/'))
a=2018
print(a,b,c,sep='/')
# Judge status: Accepted
A,B,K=map(int,input().split())
i=0
j=min(A,B)+1
while i<K:
  j-=1
  if A%j==0 and B%j==0:
    i+=1
print(j)
# Judge status: Wrong Answer
list1 = []
for i in range(4):
    list1.append(int(input()))
else:
    print(list1[1]*list1[2]+(list1[0]-list1[1])*list1[3])
# Judge status: Accepted
import sys
n, m, k = [int(i) for i in sys.stdin.readline().split()]
flg = False
for y in range(n + 1):
    for x in range(m + 1):
        if y * (m - x) + x * (n - y) == k:
            flg = True
if flg:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import math
from decimal import Decimal

X = int(input())

m = 100
c = 1

while True:
    m_ = m + math.floor(m*Decimal("0.01"))
    if m_ >= X:
        print(c)
        break
    c += 1
    m = m_
# Judge status: Accepted
N=int(input())
D=list(map(int,input().split()))
MOD=998244353
if D[0]!=0:
    print(0)
    exit()
b=[0]*N
for d in D:
    b[d]+=1
if b[0]!=1:
    print(0)
    exit()

cnt=1
#print(b)
#print(b[1:])
for v1,v2 in zip(b,b[1:]):
    #print(v1)
    #print(v2)
    cnt *= v1**v2 % MOD
print(cnt%MOD)
# Judge status: Accepted
import collections

N = int(input())
A = input().split()

c = collections.Counter(A)

for a in range(1, N+1):
    print(c[str(a)])
# Judge status: Accepted
def main():
    x, a, b = (int(i) for i in input().split())
    if abs(a - x) < abs(b - x):
        print("A")
    else:
        print("B")


if __name__ == '__main__':
    main()
# Judge status: Accepted
from fractions import gcd
from functools import reduce


def gcd_list(numbers):
    return reduce(gcd, numbers)


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

x_arr = [0] * n

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

for i in range(len(x_arr)):
    x_arr[i] = abs(x_arr[i] - x)
print(gcd_list(x_arr))
# Judge status: Accepted
n=int(input())
a=0
if n%2==1:
    print(0)
if n%2==0:
  i=1
  while 5**i<=n:
    a+=((n//(5**i))//2)
    i+=1
  print(a)
# Judge status: Wrong Answer
N = int(input())
s = [input() for i in range(N)]
row = ['AC', 'WA', 'TLE', 'RE']
for r in row:
    count = 0
    for col in s:
        if col == r:
            count += 1
    print(r, '×', count, sep=' ')
# Judge status: Accepted
N, K = [int(_) for _ in input().split()]

records = []
for i in range(K):
    d = input()
    records.extend([int(_) for _ in input().split()])

records = list(set(records))
print(N-len(records))
# Judge status: Wrong Answer
flags = [False for i in range(9)]
rows = []
for i in range(3):
    rows += list(map(int, input().split()))
N = int(input())
for ii in range(N):
    b = int(input())
    for i in range(9):
        if b == rows[i]:
            flags[i] = True
ans = False
for r in range(3):
    if sum(flags[r::1]) == 3:
        ans = True
    if sum(flags[r::3]) == 3:
        ans = True
if sum(flags[0::4]) == 3:
    ans = True
if sum(flags[2::2]) == 3:
    ans = True
if ans:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import numpy as np
a=int(input())
n=100
count = 0
while n<a:
  n = int(1.01*n)
  count += 1
  
print(count)
# Judge status: Wrong Answer
import statistics
K,N = map(int,input().split())
A = [int(n) for n in input().split()]

a1 = max(A)-min(A)

for i in range(len(A)-1):
    max_v = 0
    index = None
    if (A[i+1]-A[i])>max_v:
        max_v = A[i+1]-A[i]
        index = i+1

a2 = A[index-1]+abs(K-A[index])
print(a1) if a1<a2 else print(a2)
# Judge status: Wrong Answer
S = input()
temp = S[0]
a = 1
b = 0
for i in range(1,4):
  if temp == S[0]:
    a = a+1
  else:
    b = b+1
if b == 2 and a == 2:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,k=map(int,input().split())
ans=1
while n>=k:
  n=n//k
  ans+=1
print(ans)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
N = list(map(int, list(input().strip())))
if sum(N[:3])//3 == N[0] or sum(N[1:])//3 == N[-1]:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,m=map(int,input().split())
a=[]
k=[]
while True:
    try:
        dk,*d=list(map(int,input().split()))
        a.append(d)
        k.append(dk)
    except:
        break;
ans=set(a[0])
for i in range(1,n):
  ans=ans&set(a[i])

print(len(ans))
# Judge status: Wrong Answer
n, k = map(int, input().split())

if n < abs(n - k):
    print(n)
elif n % k == 0:
    print(0)
elif n % k != 0:
    print(1)
# Judge status: Accepted
N = int(input())

A_1 = list(map(int, input().split()))
A_2 = list(map(int, input().split()))

can_list=[]

for i in range(N) :
    A_1_can = sum(A_1[0:i+1])
    A_2_can = sum(A_2[i:N])

    can_list.append(A_1_can+A_2_can)

print(max(can_list))
# Judge status: Accepted
a, b, c = map(int, input().split())

def func():
    for i in range(a, 10000, a):
        if i % b == c:
            return "YES"

    return "NO"

print(func())
# Judge status: Wrong Answer
i = list(map(int, input().split()))
if i[1]%2 == 1:
  print('No')
  exit()

x = 1/2*(i[1]-2*i[0])
print(x)

if 0 <= x < i[0] and x.is_integer():
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
import math

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

a = int(B / C) - int((A-1) / C)
b = int(B / D) - int((A-1) / D) 
c = C * D 
d = int(B / c) - int((A-1) / c)

Ans = (B - A + 1) - a - b + d 
print(Ans)
# Judge status: Wrong Answer
a = int(input())
b = int(input())
h = int(input())
sum = a + b
print (sum * h / 2)
# Judge status: Accepted
s = list(input())
for i in range(3):
  if s[i] == s[i+1]:
    print("Bad")
    exit()
print("Good")
# Judge status: Wrong Answer
N, K = map(int, input().split())

if N % K != 1:
  print(1)
else:
  print(0)
# Judge status: Accepted
a,b,c,x,y = map(int,input().split())
ans = 0
if x > y:
    a,b,x,y = b,a,y,x
if a + b >= 2 * c:
    ans1 = 2 * c * x + b * (y - x)
    ans2 = 2 * c * y
    print(min(ans1,ans2))
else:
    print(a*x + b*y)
# Judge status: Accepted
from collections import deque
S=deque(input())
q=int(input())
rev=False
for i in range(q):
  c=list(input().split())
  if c[0]=='1':
    rev=not rev
  elif c[1]=='1' and rev==False:
    S.appendleft(c[2])
  elif c[1]=='2' and rev==True:
    S.appendleft(c[2])
  else:
    S.append(c[2])
if rev:
  S.reverse()
ans=''.join(S)
print(ans)
# Judge status: Accepted
a,b,c,K=map(int,input().split())
print(K if a>=K else a if b+a>=K else a-(K-a-b))
# Judge status: Accepted
s=input()
print("Bad" if any([s[i]==s[i+1] for i in range(len(s)-1)]) else "Good")
# Judge status: Accepted
chars = input().split(" ")
print(chars[1]+chars[0])
# Judge status: Accepted
c=list(map(int,input().split()))
c.sort()
if c[0]+c[1]==c[2]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import numpy as np
N,M = map(int,input().split())
A = np.array([list(input()) for n in range(N)])
B = np.array([list(input()) for m in range(M)])
a = "No"
 
for i in range(N-M+1):
  for j in range(N-M+1):
    if (A[i:i+M,j:j+M]==B).all():
      a = "Yes"

print(a)
# Judge status: Accepted
n, k = map(int, input().split())
s = input()
i = s.find("1")/2
ans = 0

# former part
while ans * (k-1) < i:
    ans += 1
i = max(i, ans * (k-1))

# latter part
tmp = 0
while tmp * (k-1) + i < n-1:
    tmp += 1

print(ans + tmp)
# Judge status: Wrong Answer
X = int(input())

cand = int(pow(X, 0.2))
diff = - (X - pow(cand, 5))

other = 0
for i in range(-cand, cand + 1):
    if diff == int(pow(i, 5)):
        other = i

print(cand, other)
# Judge status: Wrong Answer
# N問出題
# M回提出

ans = []
pena = 0
N, M = map(int, input().split())
for m in range(M):
    p, s = input().split()
    # 次の問題へ
    if s == "AC":
        ans.append(p)
    if s == "WA" and (p not in ans):
        pena +=1

print(len(set(ans)), pena)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
print("No" if a==b==c else "Yes")
# Judge status: Wrong Answer
for d in range(365):
    print(d%365 + 1)
# Judge status: Wrong Answer
n, m = map(int,input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
for i in range(n - m + 1):
  for j in range(n - m + 1):
    for k in range(m):
      print(a[i+k][j:j+m], b[k])
      if a[i+k][j:j+m] != b[k]:
        break
    else:
      print('Yes')
      exit()
print('No')
# Judge status: Accepted
x, y=map(int, input().split())
print(-1 if x%y==0 else x)
# Judge status: Accepted
n = int(input())
s = [input() for _ in range(n)]

import collections

c = collections.Counter(s)

print(len(c.keys()))
# Judge status: Accepted
h, n = map(int, input().split())
a = []
b = []
for i in range(n):
  x, y = map(int, input().split())
  a.append(x)
  b.append(y)

dp = list([9e9] * (h + 1) for i in range(n + 1))
dp[0][0] = 0

for i in range(n):
  for j in range(h + 1):
    dp[i + 1][j] = min(dp[i+1][j], dp[i][j])
    dp[i+1][min(j+a[i], h)] = min(dp[i+1][min(j+a[i], h)], dp[i+1][j] + b[i])

print(dp[n][h])
# Judge status: Accepted
A,B,C = list(map(int,input().split()))
lis = [ (A * i) % B for i in range(1,B+1)]
if C in lis:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
# coding: utf-8
n, x = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
for i in range(n-1):
    s = A[i+1] + A[i]
    if s > x:
        if s-x > A[i+1]:
            t = s-x-A[i+1]
            A[i+1] = 0
            A[i] -= t
        else:
            A[i+1] -= s - x
print(S - sum(A))
# Judge status: Wrong Answer

N = input()
dp = [[0] * 2 for _ in range(len(N) + 1)]

for i in range(len(N)):
    n = int(N[i])
    dp[i + 1][0] = min(dp[i][0] + n, dp[i][1] + 10 - n)
    dp[i + 1][1] = min(dp[i][0] + n + 1, dp[i][1] + 10 - (n + 1))

print(dp[-1][0])
# Judge status: Accepted
n = int(input())
arr = list(map(int,input().split()))
def odd(n) : return (n%2==1)
lst = list(filter(odd,arr[0:n:2]))
print(len(lst))
# Judge status: Wrong Answer
s=input()
t=input()

s.split()
t.split()

ans = 0

if s==t:
    print("0")

for i in range(len(s)):
    if s[i]!=t[i]:
        ans += 1

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

if len(P) == 0:
  print(X)
else:
  for i in range(1,101):
    if P.count(X-i) == 0:
      print(X-i)
      break
    elif P.count(X+i) == 0:
      print(X+i)
      break
    else:
      continue
# Judge status: Wrong Answer
import itertools

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

e = []

for i in range(q):
  e.append(list(map(int, input().split())))

a = itertools.combinations(list(range(m)),n)

max_total = 0

for i in a:
  total = 0
  
  for j in e:
    if i[j[1]-1] - i[j[0]-1] == j[2]:
      total += j[3]
  
  if max_total < total:
    max_total = total
      
print(max_total)
# Judge status: Wrong Answer
N = int(input())
c = input()

count = 0
for i in range(1, N):
    if c[i] == 'W':
        count += 1
print(count)
# Judge status: Accepted
from collections import Counter
S = input()
n = len(S)
mx = max(Counter(S).values())
if mx * 3 <= n + 2:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
N=int(input())
H=[[0,0,0] for _ in range(110000)]
dp=[[0,0,0] for _ in range(110000)]

for i in range(1,N+1):
    H[i][0],H[i][1],H[i][2]=map(int,input().split())

for i in range(1,N+1):
    for p in range(3):
        for y in range(3):
            if (p!=y):
                dp[i][p]=max(dp[i][p],dp[i-1][y]+H[i][p])

print(max(dp[N]))
# Judge status: Wrong Answer
A, B = map(int, input().split())

S = A if A < B else B

s = int(S**(1/2))+1

cd = [1]
if (A % 2 == 0) and (B % 2 == 0):
    cd.append(2)

for i in range(3, s, 2):
    if A % i == 0:
        if B % i == 0:
            cd.append(i)
            
#print(cd)

count = 0
for i in cd:
    for c in range(2, int(i**(1/2))+1):
        if i % c == 0:
            break
    else:
        count += 1
         
print(count)
# Judge status: Wrong Answer
def main():
    a = int(input())
    s = input()

    if a > 3200:
        print(s)
    else:
        print("red")

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
# input
a_n, b_n, m = map(int, input().split())
a = input().split()
b = input().split()
x = [input().split() for i in range(m)]

# calc
min_price = 100000
tmp_price = min_price
for p in x:
   tmp_price = int(a[int(p[0])-1]) + int(b[int(p[1])-2]) - int(p[2])
   if tmp_price < min_price:
       min_price = tmp_price
print(min_price)
# Judge status: Accepted
import math
n, p, *a = map(int, open(0).read().split())


def c(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


memo = [0, 0]
for i in range(n):
    memo[a[i] % 2] += 1
# p == 0


ans = 0
if p == 0:
    for i in range(0, memo[1] + 1, 2):
        ans += c(memo[1], i) * pow(2, memo[0])
else:
    for i in range(1, memo[1] + 1, 2):
        ans += c(memo[1], i) * pow(2, memo[0])
# p == 1
print(ans)
# Judge status: Accepted
n=int(input())
s=input()
maxx=-1
def got(a,al):
    for i in a:
        if i==al :
      	    return(True)
    return(False)
for i in range(n):
    a=s[:i]
    b=s[i:]
    cnt=0
    alp="abcdefghijklmnopqrstuvwxyz"
    for al in alp:
        if got(a,al) and got(b,al):
      	    cnt+=1
    maxx=max(maxx,cnt)
print(maxx)
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))
afterA = [0] * N
ans = list()

for i in range(N, 0, -1):
  cnt = 0
  for j in range(2, (N//i) + 1):
    cnt += afterA[j*i-1] 
  if(cnt % 2 != A[i-1]):
    afterA[i-1] = 1 
    ans.append(i)
  
print(sum(afterA))
print(*ans)