peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.buffer.readline
read = sys.stdin.buffer.read
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
#import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque



def run():
    N, *A = map(int, read().split())
    ans = 0
    for i in range(1, N, 2):
        if A[i] % 2:
            ans += 1

    print(ans)



if __name__ == "__main__":
    run()
# Judge status: Accepted
from sys import stdin
input = stdin.buffer.readline

x = int(input())
print(8 - (x - 400) // 200)
# Judge status: Accepted
import itertools
import math

antena = []
antena.append(int(input()))
antena.append(int(input()))
antena.append(int(input()))
antena.append(int(input()))
antena.append(int(input()))

mod = []
idx = 0
for i in range(len(antena)):
    mod.append(antena[i] % 10)
    if(mod[i] == 0):
        mod[i]=10

idx = mod.index(min(mod))
sum = 0
for i in range(len(antena)):
    if i != idx:
        sum += math.ceil(antena[i]/10) * 10
print(sum + antena[idx])
# Judge status: Accepted
n, m = map(int, input().split())
a = list(map(int, input().split()))
num = sum(a)
cnt = 0
for i in range(n):
    if a[i] < num/(4*m):
        continue
    else:
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import math
N, X, T = map(int, input().split())
 
print(math.ceil((N/X))+T)
# Judge status: Accepted
S = list(input())
S.sort()
if S == ['a', 'b', 'c']:
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
import math

X, N = map(int, input().split())
if N == 0:
  print(X)
else:
  p = list(map(int, input().split()))

  q = [int(i)+1 for i in range(100)]
  #print(q)

  for i in p:
    q.remove(i)

  ans = 0
  r0 = 101
  for j in q:
    r = abs(j-X)
    if r0 > r:
      r0 = r
      ans = j
  print(ans)
# Judge status: Wrong Answer
n = int(input())
toko = [int(i) for i in input().split()]

ans = [int(0) for i in range(n)]

for j in range(n): ##01234
  ans[toko[j]-1] = j + 1
  
print(ans)
# Judge status: Accepted
N = int(input())
S = input()

oder = N
l = [0 for i in range(N)]
r = [0 for i in range(N)]

for i in range(1, N):
  l[i] = l[i-1] + (S[i-1] == 'W')
  r[-i-1] = r[-i] + (S[-i] == 'E')

for i in range(N):
  oder = min(oder, l[i]+r[i])

print(oder)
# Judge status: Accepted
S = input()
N = len(S)

length = 0
for i in range(N):
  for j in range(i,N):
    if all([(c in 'ACGT') for c in S[i:j+1]]):
      length = max(length, len(S[i:j+1]))

print(length)
# Judge status: Accepted
N, M = map(int, input().split())
L_list = []
R_list = []
for i in range(M):
  L, R = map(int, input().split())
  L_list.append(L)
  R_list.append(R)
if min(R_list) - max(L_list) < 0:
  print("0")
else:
  print(min(R_list) - max(L_list) + 1)
# Judge status: Accepted
import math
A, B, H, M = map(float, input().split())

m_angle = 6.0 * M
h_angle = 30.0 * H + 0.5 * M

theta = abs(h_angle - m_angle)
theta = min(theta, 360.0 - theta)
print(math.sqrt(A * A + B * B - 2 * A * B * math.cos(math.radians(theta))))
# Judge status: Wrong Answer
from collections import Counter

n = int(input())
a_input = list(map(int,input().split()))

a_c = sorted(Counter(a_input).items(),key=lambda x:x[0],reverse=True)

max_len=0
next_len=0
ans=0
for a in a_c:
    if a[1]<2:
        continue
    max_len = max(max_len,a[0])
    if a[1]>=4:
        ans = a[0]**2
    if max_len>a[0]:
        next_len = max(next_len,a[0])
print(max(ans,max_len*next_len))
# Judge status: Wrong Answer
S = input()
ans_1 = False
ans_2 = False
for i in range (0, len(S), 2):
    if S[i] != "L":
        ans_1 = True
for j in range (1, len(S), 2):
    if S[j] != "R":
        ans_2 = True
if ans_1 and ans_2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,d = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for i in range(n-1):
  for j in range(i+1,n):
    s = 0
    for k in range(d):
      s += abs(x[i][k] - x[j][k])**2
    s = s**0.5
    if s.is_integer(): ans += 1
print(ans)
# Judge status: Accepted
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    n = II()
    aa = MII()
    bb = MII()
    ra = rb = 0
    for a,b in zip(aa,bb):
        if a>b: ra += a-b
        if b>a: rb += (b-a)//2
    if rb >= ra: print('Yes')
    else: print('No')

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n,m = map(int,input().split())
l =[ list(map(int,input().split())) for i in range(m)]
l1 = set([i[1] for i in l if i[0]==1])
l2 = set([i[2] for i in l if i[0]==n])
l3 = l1&l2
if len(l3)>=1:
  print("POSSIBLE")
else:
  print("IMPOSSIBLE")
# Judge status: Accepted
s=input()
n1=s[::2].count("0")+s[1::2].count("1")
n2=s[::2].count("1")+s[1::2].count("0")
print(min(n1,n2))
# Judge status: Accepted
X = input()
s_cnt = 0
ans = 0
for s in X:
    if s=='S':
        s_cnt += 1
    else:
        if s_cnt > 0:
            ans += 1
            s_cnt -= 1

print(len(X) - 2*ans)
# Judge status: Accepted
import heapq
n = int(input())
v = list(map(int, input().split()))
heapq.heapify(v)
count = 0
ab = 0
while count < n-1:
    a = heapq.heappop(v)
    b = heapq.heappop(v)
    ab = (a+b)/2
    heapq.heappush(v, ab)
    count += 1

ans = ab
print(ans)
# Judge status: Wrong Answer
N, K, S = map(int, input().split())
if N==K:
  A = [S]*N
  print(*A)
  exit()
if S%2 == 0:
  a = S//2
  b = S//2
else:
  a = S//2+1
  b = S//2
A = [0]*N
for i in range(N):
  if i%2==0:
    A[i] = a
  else:
    A[i] = b
print(A)
cnt = 0
for i in range(N-1):
  if A[i]+A[i+1] == S:
    cnt += 1
print(cnt)
ind = N-1
while cnt > K:
  if S == 10**9:
    A[ind] = S-1
  else:
    A[ind] = S+1
  cnt -= 1
  ind -= 1
print(*A)
# Judge status: Accepted
"""abc088_b"""
N = input()
a = sorted(list(map(int, input().split())), reverse=True)
print(sum(a[0::2])-sum(a[1::2]))
# Judge status: Accepted
from fractions import gcd

n, x = [int(i) for i in input().split()]
x_list = [int(i) for i in input().split()]

temp_list = [abs(num - x) for num in x_list]

ans = temp_list[0]
for i in range(1, n):
    ans = gcd(ans, temp_list[i])
    if ans == 1:
        break
print(ans)
# Judge status: Accepted
W, H, N = map(int, input().split())

right = W
left = 0
top = H
bottom = 0

for i in range(N):
    x, y, a = map(int, input().split())
    if a == 1 and left <= x:
        left = x
    elif a == 2 and right >= x:
        right = x
    elif a == 3 and bottom <= y:
        bottom = y
    elif a == 4 and top >= y:
        top = y

if (top-bottom)*(right-left) > 0 and (top-bottom)>0 and (right-left)>0:
    print((top-bottom)*(right-left))
else:
    print(0)
# Judge status: Accepted
s = input()
t = input()

if s == t[:-1]:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
n=int(input())
t=n
c=1
while t>=10:
    t=t//10
    c=c+1
ans=0
for i in range(1,c):
    if i%2==1:
        ans+=10**(i)-10**(i-1)
if c%2==1:
    ans=ans+n+1-10**(c-1)
print(ans)
# Judge status: Accepted
a=input()
b=input()
c=len(a)
d=len(b)
x=""
if c<=d:
  for i in range(c):
    x=x+a[i]
    x=x+b[i]
  print(x)
if c>d:
  for i in range(d):
    x=x+a[i]
    x=x+b[i]
  x=x+a[len(a)-1]
  print(x)
# Judge status: Wrong Answer
n,m=map(int,input().split())
l={}
for i in range(m):
    p,q=map(int,input().split())
    if not p in l:
        l[p]=1
    else:
        l[p]+=1
    if not q in l:
        l[q] = 1
    else:
        l[q] += 1
print(*l.values(), sep='\n')
# Judge status: Wrong Answer
K, X = map(int, input().split())
A = []
for i in range(K):
  A.append(X-K+i+1)
for i in range(K-1):
  A.append(X+i+1)
print(A, sep=" ")
# Judge status: Wrong Answer
S = input()
results = True
while results:
    for key_word in ("erase", "eraser", "dream", "dreamer"):
        if S.endswith(key_word):
            S = S[:-len(key_word)]
            continue
    if S == '':
        print("YES")
        results = False
        break
    else:
        print("NO")
        results = False
        break
# Judge status: Accepted
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

MOD = 10 ** 9 + 7

N = int(input())
A = list(map(int, input().split()))
B = [bin(a) for a in A]

maxA = max(A)
mask = 1

count = 0
i = 0
while maxA >> i:
    zeros = sum([1 for a in A if (mask * 2**i) & a == 0]) % MOD
    ones = (len(A) - zeros) % MOD
    count += zeros * ones * ((2**i) % MOD)
    count %= MOD
    i += 1

print(count)
# Judge status: Accepted
N = int(input())
A = [int(i) for i in input().split()]

B = [0] * N

for i, a in enumerate(A):
	B[a-1] = i+1
print(*B)
# Judge status: Wrong Answer
X,Y = map(int, input().split())

ans = X
count = 0
while(ans < Y):
  if(ans*2>Y):
    exit()
  else:
    ans = ans * 2
    count += 1
    
print(ans)
# Judge status: Wrong Answer
x,a,b = (int(i) for i in input().split())
if a < b:
  if b-a > x:
    print ('dengerous')
  else:
    print ('safe')
else:
  print ('delicious')
# Judge status: Accepted
import heapq
N,M=map(int,input().split())
AB=[[]for i in range(10**5+1)]
for i in range(N):
    a,b=map(int,input().split())
    AB[a].append(-b)
q=[]
heapq.heapify(q)
ans=0
for i in range(1,M+1):
    for b in AB[i]:
        heapq.heappush(q,b)
    if len(q)>0:
        ans+=-heapq.heappop(q)
print(ans)
# Judge status: Wrong Answer
n, k = map(int,input().split(" "))
trees = []
for i in range(n):
    trees.append(int(input()))

trees.sort()
min_val = trees[k-1] - trees[0]
for i in range(1, n - k + 1):
    min_val = min(abs(trees[i-k+1] - trees[i]), min_val)
    
print(min_val)
# Judge status: Wrong Answer
x,y=map(int,input().split())
if y%x == 0:
    print(-1)
else:
    print(x)
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline

def main():
    s = input()
    if s.isupper():
        print(s.lower())
    else:
        print(s.upper())

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N = int(input())
A = [int(input()) for _ in range(N)]

mi = float("inf")
ans = 0
for i in range(N):
    if mi >= A[i]:
        ans += 1
        mi = A[i]

print(ans)
# Judge status: Accepted
a,b,x = map(int, input().split())
print(b//x - a//x + (a%x == 0))
# Judge status: Accepted
s = input()
t = input()

s = sorted(s)
t = sorted(t)[::-1]

if s == t:
    print("No")
    exit()

st = []
st.append(s)
st.append(t)
st = sorted(st)

if st[0] == s:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from fractions import gcd

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

ans = a[0]
for i in range(1, n):
    ans = gcd(ans, a[i])

print(ans)
# Judge status: Accepted
D, T, S = map(int, input().split())

print('Yes' if D <= T*S else 'No')
# Judge status: Wrong Answer
# ALC 005 C

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

list_d.sort()
list_d[N//2] - list_d[N//2 -1]
# Judge status: Wrong Answer
S = input()

if S[0] == 'a' or 'b' or 'c' and  S[1] == 'a' or 'b' or 'c' and S[2] == 'a' or 'b' or 'c':
  print ('YES')
else:
  print ('No')
# Judge status: Accepted
s=sorted(input())
t=sorted(input(),reverse=True)
n=min(len(s),len(t))

for i in range(n):
    if ord(s[i])<ord(t[i]):
        print("Yes")
        exit()
    elif ord(t[i])<ord(s[i]):
        print("No")
        exit()
        
if len(s)<len(t):
    print("Yes")
else:
    print("No")
# Judge status: Wrong Answer
N = int(input())

result = [input() for _ in range(N)]

C_AC,C_TLE,C_WA,C_RE = [0,0,0,0]

for i in result:
  if i == "AC":
    C_AC += 1
  elif i == "WA":
    C_WA += 1
  elif i == "TLE":
    C_TLE += 1
  elif i == "RE":
    C_RE += 1

print("AC x " + str(C_AC))
print("WA x " + str(C_WA))
print("TLE x " + str(C_TLE))
print("AC x " + str(C_RE))
# Judge status: Accepted
def main():
    a, b, c = map(int, input().split())
    print(['NO', 'YES'][(a*100+b*10+c) % 4 == 0])


main()
# Judge status: Wrong Answer
seq = int(input())
a = 10**9 + 7
answer = (10**seq - 2*9**seq + 8**seq)%a
print(answer)
# Judge status: Accepted
n=int(input())
rootn=int(n**(0.5))+1
m=10**20
for i in range(1,rootn):
    if n/i==n//i:
        m=min(m,i+n//i)
print(m-2)
# Judge status: Accepted
n,m = map(int,input().split())
road = [list(map(int,input().split())) for r in range(m)]
ans = [0] * n
for r in road:
	for rr in r:
		ans[rr-1] += 1
for a in ans:
	print(a)
# Judge status: Accepted
N = int(input())
D = [input().split() for i in range(N)]

ans = 'No'
for i in range(N-2):
    if D[i][0] == D[i][1] :
        if D[i+1][0] == D[i+1][1] :
            if D[i+2][0] == D[i+2][1] :
                ans = 'Yes'

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

ans = ''
if a % 2 != b % 2:
    ans = 'IMPOSSIBLE'
else:
    ans = (a + b) // 2
print(ans)
# Judge status: Accepted
from heapq import heappop, heappush, heapify
N, M = map(int, input().split())
A = list(map(int, input().split()))
BC = []
for _ in range(M):
    B, C = map(int, input().split())
    BC.append((B, C))
heapify(A)
BC = sorted(BC, key = lambda x: -x[1])

for b, c in BC:
    for j in range(b):
        a = heappop(A)
        if a < c:
            heappush(A, c)
        else:
            heappush(A, a)
            break

print(sum(A))
# Judge status: Accepted
power=1
for i in range(1,int(input())+1):
  power=(power*i)%(10**9+7)
print(power)
# Judge status: Wrong Answer
#E - Logs
import math
# 入力
N,K = map(int,input().split())
A   = list(map(int,input().split()))
Amax = int(max(A))
high = Amax
Cancut = Amax
low  = 0
while ( low < high ) :
    Cut = 0
    X = (high + low) / 2
    for i in range(N):
        Cut = Cut + math.ceil(A[i]/X) - 1
    if Cut <= K:
        high = X - 0.0001
        Cancut = X
    else:
        low  = X + 0.0001
# 出力
print(math.ceil(Cancut))
# Judge status: Accepted
h1, m1, h2, m2, K = list(map(int, input().split()))

diff = (h2-h1) * 60 + m2-m1
print(diff - K)
# Judge status: Wrong Answer
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = input()

ans = []
for idx, t in enumerate(T):
    if t == 'r':
            ans.append(P)
    elif t == 's':
            ans.append(R)
    elif t == 'p':
            ans.append(S)

for i in range(N-K):
    if T[i] == T[i+K]:
        ans[i+K] = 0

print(sum(ans))
# Judge status: Accepted
S=input()

if S=="hi" or S=="hihi" or S=="hihihi" or S=="hihihihi" or S=="hihihihihi":
    print("Yes")
else:
    print("No")
# Judge status: Accepted
S = input()
T = input()

def rotate(s):
  rotate_list = []
  for _ in range(len(s)):
    # 最後の文字を取り出す
    tmp = s[-1]
    # 残りとくっつける
    tmp = tmp + s[0:-1] 
    rotate_list.append( tmp )
    s = tmp
  return rotate_list

l = rotate(S)

if T in l:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
x, y = map(int, input().split())

for a in range(x + 1):
    if 2 * a + 4 * (x - a) == y:
        answer = "Yes"
        break
    else:
        answer ="No"

print(answer)
# Judge status: Wrong Answer
import math
import fractions
A,B,C,D= map(int,input().split())
c = math.floor(B/C)-math.ceil(A/C) + 1
d = math.floor(B/D)-math.ceil(A/D) + 1
s = C*D//fractions.gcd(C,D)
e = math.floor(B/s)-math.ceil(A/s) + 1
print(B-A+1-c-d+e)
# Judge status: Accepted
n, k, q = [int(i) for i in input().split()]
a = [None for i in range(q)]
for i in range(q):
  a[i] = int(input())

pt = [0 for i in range(n)]

for i in range(q):
  pt[a[i] - 1] += 1

th = q - k

result = list(map(lambda x: 'Yes' if x > th else 'No', pt))
print('\n'.join(result))
# Judge status: Accepted
X = int(input())
import math
A = X // math.gcd(360, X)
ans = 360 * A // X
print(ans)
# Judge status: Wrong Answer
S, W = map(int, input().split())
if S / 2 <= W:
  print('unsafe')
else:
  print('safe')
# Judge status: Wrong Answer
S = input('曜日を入力してください ＞ ')

if S == 'MON':
    print(6)
elif S == 'TUE':
    print(5)
elif S == 'WED':
    print(4)
elif S == 'THU':
    print(3)
elif S == 'FRI':
    print(2)
elif S == 'SAT':
    print(1)
elif S == 'SUN':
    print(7)
else:
    print('曜日が無効です')
# Judge status: Accepted
n,*a=map(int,open(0).read().split());t,w=sum(a),1;print(sum([1]+[exit(print(-1)) if(w:=min(2*(w-q),t:=t-q))<0 else w for q in a]))
# Judge status: Accepted
s=int(input())
a=list(map(int,input().split()))
c=0
for x in range(1,s-1):
    if a[x-1]<a[x] and a[x]<a[x+1]:c+=1
    if a[x-1]>a[x] and a[x]>a[x+1]:c+=1
print(c)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
amari=[0]*4

for i in range(n):
    amari[a[i]%4]+=1

if amari[2]>0:
    if amari[1]+amari[3]<=amari[0]:
        print("Yes")
    else:
        print("No")
else:
    if amari[1]+amari[3]-1<=amari[0]:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
n = int(input())
arr = list(map(int,input().split()))
pro = 1
for i in arr:
    pro *= i
    if pro > 10**18:
        print(-1)
        break
else:
    print(pro)
# Judge status: Accepted
n = int(input())

ans = 800*n - (n//15)*200
print(ans)
# Judge status: Accepted
import collections
n,k = map(int, input().split())
a = list(map(int, input().split()))
l = collections.Counter(a)
p = list(l.values())
p.sort()
ans = 0
for i in range(len(p)-k):
    ans += p[i]
print(ans)
# Judge status: Accepted
K, N = map(int, input().split())

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

A = sorted(a)

maxl = A[0] + K - A[N-1]

if maxl <= 0:
    maxl = -1 * maxl


for i in range(N-1):
    l = A[i] - A[i+1]

    if l <= 0:
        l = -1 * l
    
    if maxl < l:
        maxl = l

ans = K - maxl

print(ans)
# Judge status: Wrong Answer
# coding: utf-8
# Your code here!

N=list(input())
if len(set(N))==1:
    print(''.join(N))
else:
    N=[max(N)]*len(N)
    print(''.join(N))
# Judge status: Wrong Answer
S = input()

if (S[2]==S[3]) and (S[4]==S[5]):
  print("Yes")
else:
  print("Np")
# Judge status: Wrong Answer
import math
r=int(input())
area1=math.pi
arear=math.pi*pow(r,2)
ratio=int(arear/area1)
print(ratio)
# Judge status: Wrong Answer
import math
r = int(input())

print(r * math.pi)
# Judge status: Accepted
a,b = map(int,input().split())
if a+b > 23:
    print(a+b-24)
else:
    print(a+b)
# Judge status: Accepted
ais = sorted(map(int, raw_input().split()))
print 'Yes' if sum(ais[:2]) == ais[2] else 'No'
# Judge status: Wrong Answer
x=int(input())
ans=2*(x//11)
x-=(ans//2)*11
if x<=6:
    ans+=1
else:
    ans+=2
print(ans)
# Judge status: Wrong Answer
n=int(input())
x=0
while x<n:
  x+=1000
print(n-x)
# Judge status: Wrong Answer
X = int(input())
if X > 30:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n=int(input())
L=list(map(int,input().split()))
cnt=0
ok=1
while ok:
  for i in range(n):
    if L[i]%2==1:
      ok=0
      break
    L[i]/=2
  if ok:cnt+=1

print(cnt)
# Judge status: Accepted
from bisect import bisect_left, bisect_right
# import random


N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
# N = 10 ** 5
# A = [random.randint(1, 10**9) for _ in range(N)]
# B = [random.randint(1, 10**9) for _ in range(N)]
# C = [random.randint(1, 10**9) for _ in range(N)]

A.sort()
B.sort()
C.sort()

ans = 0
for b in B:
    a = bisect_left(A, b)
    c = N-bisect_right(C, b)
    ans += a * c

print(ans)
# Judge status: Accepted
from decimal import Decimal

x = int(input())

t = 100
n = 0
while t < x:
  t += t // 100
  n += 1
print(n)
# Judge status: Wrong Answer
def resolve():
    '''
    code here
    '''
    S = int(input())

    a, b = divmod(S, 10**9)
    x2 = (a+1) * 10**9 - b
    y2 = (S+x2) // (10**9)

    print(0,0, 10**9, 1, x2, y2)

if __name__ == "__main__":
    resolve()
# Judge status: Wrong Answer
#!/usr/bin/env python3
import sys
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right
from itertools import accumulate

sys.setrecursionlimit(10**6)
INF = 10**12
m = 10**9 + 7

def main():
    N = int(input())
    a = list(map(int, input().split()))
    ans = 0
    for i in range(N):
        if i % 2 == 1 and a[i] % 2 == 1:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
a,b,c,d = map(int,input().split())
if abs(c-a) <= d:
    print("Yes")
elif abs(b-a) <= d and abs(c-b) <= d:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
A=int(input())
B=int(input())
C=6-A-B
print(C)
# Judge status: Accepted
N = int(input())
S = input()
print(S[S.count("R"):].count("R"))
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
print("Yes" if a+b>c else "No")
# Judge status: Wrong Answer
x = int(input())
if 400 <= x <= 599: print(8)
elif 400 <= x <= 599: print(7)
elif 600 <= x <= 799: print(6)
elif 800 <= x <= 999: print(5)
elif 1000 <= x <= 1199: print(4)
elif 1200 <= x <= 1399: print(3)
elif 1400 <= x <= 1599: print(2)
elif 1800 <= x <= 1999: print(1)
# Judge status: Accepted
# -*- coding: utf-8 -*-


def main():
    import sys
    input = sys.stdin.readline

    n, m = map(int, input().split())
    first = list()
    second = list()

    for i in range(m):
        ai, bi = map(int, input().split())

        if ai == 1:
            first.append(bi)

        if bi == n:
            second.append(ai)

    ans = set(first) & set(second)

    if len(ans) > 0:
        print('POSSIBLE')
    else:
        print('IMPOSSIBLE')


if __name__ == '__main__':
    main()
# Judge status: Accepted
#!/usr/bin/env python3
_, s = open(0).read().split()

print(
    max([sum(1 if i == "I" else -1 for i in s[:j+1])
         for j in range(int(_))] + [0]))
# Judge status: Wrong Answer
n=list(input())
print('Yes' if sum([n.count(n[i])>=3 for i in range(len(n))]) >=3 else 'No')
# Judge status: Wrong Answer
N = int(input())

ans = (N * (N+1)) / 2 - N

print(int(ans))
# Judge status: Accepted
A,V  =[int(i) for i in input().split()]
B,W = [int(i) for i in input().split()]
T = int(input())
if V > W:
    if abs(A - B) / abs(V - W) <= T:
        print("YES")
    else:
        print("NO")
else:
    if V == W and A == B:
        print("YES")
    else:
        print("NO")
# Judge status: Accepted
import math

z = 10**9 + 7

n, a, b = [int(i) for i in input().split()]

r = pow(2, n, z) - 1

def c(m):
  x = 1
  for i in range(n-m+1, n+1):
    x = x*i % z
  
  return (x * pow(math.factorial(m), z-2, z)) % z

r = (r - c(a) - c(b)) % z

print(r)
# Judge status: Accepted
x = int(input())

print(1 if x ==0 else 0)
# Judge status: Wrong Answer
#!/usr/bin/env python3

def main():
    N = int(input())
    *P, = map(int, input().split())

    mini = 2*10**5
    cnt = 0
    for _ in P:
        if _ >= mini:
            mini = _
            cnt += 1
        else:
            continue
    print(cnt)


main()
# Judge status: Accepted
A, B = map(int, input().split())
S = input()
if len(S) == A + B + 1 and S[A] == '-':
    for i in range(len(S)):
        if i != A and not S[i].isdecimal():
            print('No')
            exit()
    print('Yes')
else:
    print('No')
# Judge status: Accepted
# coding: utf-8
N,H=map(int,input().split())

A=[]
B=[]
for i in range(N):
    a,b=map(int,input().split())
    A.append(a)
    B.append(b)

MA=max(A)
ans=0
B.sort()
k=-1

while B[k]>MA:
    H-=B[k]
    k-=1
    ans+=1
    if H<=0:
        break
    if k<-N:
        break
if H>=0:
    ans+=-(-H//MA)

print(ans)
# Judge status: Accepted
n, m = map(int,input().split())
sc = [list(map(int,input().split())) for _ in range(m)]

ans = -1

for i in range(1000):
    s_i = str(i)
    if len(s_i) == n and all(int(s_i[s-1])==c for s,c in sc):
        ans = i
        break

print(ans)
# Judge status: Accepted
A, B, K = map(int, input().split())
list = [i for i in range(A, A+K)]
list.extend(i for i in range(B+1-K, B+1))
list = sorted(set(list))
for i in list:
    if A<=i<=B:
        print(i)
# Judge status: Accepted
N=int(input())
a=list(map(int,input().split()))
S=0
for i in a:
  S^=i
a=[S^i for i in a]  
print(*a)