peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N = int(input())
A = {input() for _ in range(N)}
print(len(A))
# Judge status: Wrong Answer
N, K = [int(x) for x in input().split(" ")]
setlst = {int(x) for x in input().split(" ")}

swap = 0

if len(setlst)-K > 0:
  swap = len(setlst)-K
else:
  swap = 0

print(swap)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
    a[i]-=1
ans=0
for i in range(n-1):
    if a[i]==i and a[i+1]==i+1:
        ans+=1
        a[i],a[i+1]=i+1,i
    if a[i]==i:
        ans+=1
if a[-1]==n-1:
    ans+=1
print(ans)
# Judge status: Accepted
n, m = map(int, input().split())

if m == 1:
  ans = 0
elif m > n:
  ans = (m - n*2) // 4 +n
elif n >= m:
  ans = m//2
  
print(ans)
# Judge status: Wrong Answer
N = int(input())

lis = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']


def dfs(ans, keep_num, n):
    if n == N - 1:
        for i in range(keep_num + 2):
            print(ans + lis[i])
    else:
        for i in range(n + 1):
            dfs(ans + lis[i], max(i, keep_num), n + 1)


dfs('', 0, 0)
# Judge status: Accepted
n,k = map(int,input().split())
s = list(input())
memory = 0
count = 0
for i in range(n):
    if s[i] == memory:
        count += 1
    memory = s[i]
print(min(count+k*2,n-1))
# Judge status: Accepted
s=str(input())
t=str(input())
ss=sorted(s)
tt=sorted(t, reverse=True)
if ss < tt:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
l = list(map(int, input().split()))
l.sort()
print(l[2] * 10 + l[1] + l[0])
# Judge status: Accepted
def main():
    print("2018" + input()[4:])


if __name__ == '__main__':
    main()
# Judge status: Accepted
h = int(input())

c = 0
nb = 1
while h > 0:
    h, nb, c = h//2, nb*2, c+nb
print(c)
# Judge status: Accepted
N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]
AX = [A[i][0] for i in range(N)]
BX = [A[i][1] for i in range(N)]
AX.sort()
BX.sort()
if N % 2 == 1:
  L = AX[(N-1)//2]
  R = BX[(N-1)//2]
  print(R-L+1)
else:
  L = AX[N//2-1] + AX[N//2]
  R = BX[N//2-1] + BX[N//2]
  print(R-L+1)
# Judge status: Accepted
x, a, b = map(int, input().split())
if min(abs(x - a), abs(x - b)) == abs(x-a):
    print("A")
else:
    print("B")
# Judge status: Wrong Answer
n=int(input())
def f(x):
  x=int(x)
  cnt=0
  while x%2==0:
    cnt+=1
    x=x//2
  return cnt
a=list(map(f,input().split()))
print(max(a))
# Judge status: Accepted
a,b=map(int,input().split())
if abs(a-b)%2==0:
  print((a+b)//2)
else:
  print('IMPOSSIBLE')
# Judge status: Wrong Answer
n,*a=map(int,open(0).read().split());c=0;i=1
for _ in[0]*61:i**=2;t=sum(i&b and 1for b in a);c+=t*(n-t)*i;c%=10**9+7
print(c)
# Judge status: Accepted
n, k = map(int, input().split())
A = list(map(lambda x: int(x)-1, input().split()))
bit = k.bit_length()
table = [[0]*n for _ in range(bit)]
table[0] = A

for i in range(1, bit):
    for j in range(n):
        table[i][j] = table[i-1][table[i-1][j]]

ans = 0
for i in reversed(range(bit)):
    if (1 << i) <= k:
        k -= 1 << i
        ans = table[i][ans]
print(ans+1)
# Judge status: Wrong Answer
n=int(input())
ans=10e5
for a in range(2,n//2+1):
    b=n-a
    ans=min(ans,sum([int(i) for i in str(a)])+sum([int(i) for i in str(b)]))
print(int(ans))
# Judge status: Accepted
N = int(input())
W = list(map(int, input().split()))
count = abs(sum(W[:1]) - sum(W[1:]))
for T in range(2, N):
    if count > abs(sum(W[:T]) - sum(W[T:])):
        count = abs(sum(W[:T]) - sum(W[T:]))
print(count)
# Judge status: Wrong Answer
a,b = map(float, input().split())
c = b.as_integer_ratio()
d = int(c[0])
e = int(c[1])
print(int(a*d/e))
# Judge status: Accepted
import heapq

x,y,a,b,c = map(int,input().split())
p_list = list(map(int,input().split()))
q_list = list(map(int,input().split()))
r_list = list(map(int,input().split()))

p_target = heapq.nlargest(x, p_list)
q_target = heapq.nlargest(y, q_list)
r_target = heapq.nlargest(c, r_list)

p_target.extend(q_target)
p_target.extend(r_target)

p_target.sort(reverse=True)
print(sum(p_target[:x+y]))
# Judge status: Accepted
import collections
n,k = map(int,input().split())
a = list(map(int,input().split()))
c = sorted(list(collections.Counter(a).values()))
print(sum(c[:-k]))
# Judge status: Wrong Answer
from itertools import accumulate
N,*A=map(int, open(0).read().split())
if N==0:
    print(1)
    exit()
if A[0]!=0:
    print(-1)
    exit()
R=[0]*(N+1)
R[0]=1
ans=0
for i in range(N):
    R[i]-=A[i]
    if R[i]<0:
        print(-1)
        exit()
    R[i+1]=min(R[i]*2,10**10)
B=list(accumulate(A[::-1]))[::-1]
ans+=sum(min(R[i]+A[i],B[i])for i in range(N+1))
print(ans)
# Judge status: Accepted
A, B, C = list(map(int,input().split()))
if B-A == C-B:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
A,B,K=[int(x) for x in input().split(' ')]

lis=[]
blis=[]
count=0

sm=min([A,B])
bm=max([A,B])
for i in range(1,sm+1):
	if sm/i == sm//i:
		lis.append(i)

for i in lis:
	if bm/i == bm//i:
		blis.append(i)

blis=list(set(blis))
blis.sort()
blis.reverse()

print(blis[K-1])


#8 12 2
# Judge status: Accepted
a,b,c = map(int,input().split())

temp = b*10+c
if temp%4 == 0:
  print("YES")
else:
  print("NO")
# Judge status: Accepted
import sys

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


def main():
    s = input()
    ok = [{"N", "S"}, {"E", "W"}, {"N", "S", "E", "W"}]
    if set(s) in ok:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
k, s = map(int, input().split())

ans = 0
for x in range(k+1)[::-1]:
    y = min(s-x, k)
    z = s-x-y
    if z > k:
        break
    ans += y - z + 1

print(ans)
# Judge status: Accepted
import sys
from math import ceil, floor, sqrt
from collections import deque, Counter, defaultdict
from fractions import gcd
from decimal import Decimal
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def main():
    a,b,c = map(int, input().split())

    if Decimal(a).sqrt() + Decimal(b).sqrt() < Decimal(c).sqrt():
        print('Yes')
    else:
        print('No')    
    return

if __name__ == '__main__':
    main()
# Judge status: Accepted
S = list(input())
T = list(input())

out=[]
for i in range(len(S)-len(T)+1):
    cnt=0
    for j in range(len(T)):
        if S[i+j] != T[j]:
            cnt+=1
    out.append(cnt)
print(min(out))
# Judge status: Accepted
n=int(input())
v=list(map(int,input().split()))
v.sort()
ans=v[0]
for i in v:
  ans=(ans+i)/2
print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
print((a+b)//2 if (a+b)%2 == 0 else "IMPOSSIBLE")
# Judge status: Accepted
import sys 
input = sys.stdin.readline

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

#box = [0]*(N+1)

for i in range(N,0,-1):
    k=2
    temp=a[i-1]
    #print(123,i,ball)
    while i*k<=N:
        if a[i*k-1]==1:
            temp = (temp+1)%2
        k+=1
    a[i-1] = temp
#print(box)
M=0
b=[]
for i in range(1,N+1):
    if a[i-1]==1:
        M+=1
        b.append(i)

print(M)
[print(x) for x in b]
# Judge status: Accepted
a = int(input())
b = int(input())
c = int(input())
x = int(input())

ans = 0
for i in range(a + 1):
    for j in range(b + 1):
        for k in range(c + 1):
            total = i * 500 + 100 * j + 50 * k
            if total == x:
                ans += 1
print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
cnt = {}
for x in a:
    if x not in cnt:cnt[x] = 1
    else:cnt[x] +=1
res = []
for key in cnt:
    v  = cnt[key]
    if v>=2:
        res.append(key)
    if v >=4:res.append(key)
res.sort(reverse = True)
if len(res) < 2:ans=0
else:
    ans = res[0]*res[1]
print(ans)
# Judge status: Accepted
def prime_factorize(n):
    a = [1]
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


A, B = map(int, input().split())
cds = set(prime_factorize(A)) & set(prime_factorize(B))
print(len(cds))
# Judge status: Accepted
n,l=map(int,input().split())

num=1+l-1
number=[]
for _ in range(n):
  number.append(num)
  num+=1

if 0 in number:
  print(sum(number))
    
else:
  if all(i<0 for i in number):
    print(sum(number)-max(number))
    
  else:
    print(sum(number)-min(number))
# Judge status: Accepted
A,B = map(int,input().split())
if A <= 9 and B <= 9:
    print(A*B)
else:
    print(-1)
# Judge status: Accepted
A = []
for _ in range(3):
  A.append(list(map(int, input().split())))

B = []
while True:
    try:
        B.append(int(input()))
    except:
        break;

for i in range(3):
  if (A[0][i] in B and A[1][i] in B and A[2][i] in B) or (A[i][0] in B and A[i][1] in B and A[i][2] in B):
    print("Yes")
    import sys; sys.exit()

if (A[0][0] in B and A[1][1] in B and A[2][2] in B) or (A[0][2] in B and A[1][1] in B and A[2][0] in B):
  print("Yes")
  import sys; sys.exit()

print("No")
# Judge status: Accepted
N, K = [int(x) for x in input().split()]
snuke_list = []
for i in range(K):
    d = int(input())
    snuke_list.extend([int(x) for x in input().split()])

print(N - len(set(snuke_list)))
# Judge status: Wrong Answer
x, y, z = map(int, input().split())
ans = 0
for i in range(z, 10**5):
    if (x-i) % (y+i) == 0:
        ans = (x-i) // (y+i)
        break
print(int(ans))
# Judge status: Accepted
x,a,b=map(int,input().split())
print(['A','B'][abs(x-a)>abs(x-b)])
# Judge status: Wrong Answer
import numpy as np
n = int(input())
A = list(map(int,input().split()))
q = int(input())
BC = [list(map(int,input().split())) for _ in range(q)]
A = np.array(A)
 
def main(A,BC):
    for bc in BC:
        A = np.where(A==bc[0],bc[1],A)
        print(max(A))
        
if __name__ == '__main__':
    main(A,BC)
# Judge status: Accepted
#B
n,l=map(int,input().split())
s=[]
for i in range(n):
    s.append(input())
s.sort()
for i in s:
    print(i,end="")
# Judge status: Accepted
N = int(input())
P = list(map(lambda a: int(a) - 1, input().split()))

ans = 0
for i in range(N):
    p = P[i]
    if p == i:
        if i < N - 1:
            P[i], P[i + 1] = P[i + 1], P[i]
        ans += 1

print(ans)
# Judge status: Wrong Answer

import math
count=0
n, d =map(int,input().split())
for i in range(n):
    x, y = map(int,input().split())
    ans = math.sqrt(x**2 + y**2)
    if ans>=d:
        count+=1
print(count)
# Judge status: Wrong Answer
A,B,C = map(int, input().split())

if C > A and C < B:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
A = int(input())
B = int(input())
C = int(input())

print(int((A+B)*C/2))
# Judge status: Wrong Answer
sx, sy, tx, ty = map(int, input().split())
x = tx - sx
y = ty - sy
ans = ''
if x >= 0:
  ans += 'R'*x
else:
  ans += 'L'*-x

if y >= 0:
  ans += 'U'*y
else:
  ans += 'D'*-y
  
if x >= 0:
  ans += 'L'*x
else:
  ans += 'R'*-x

if y >= 0:
  ans += 'D'*y
else:
  ans += 'U'*-y
cycle = ans
ans += 'UR'
ans += cycle
ans += 'DL'
print(ans)
# Judge status: Wrong Answer
n = int(input().strip())
a = [int(x) for x in input().strip().split(' ')]
a = sorted(a, reverse=True)

sum = a[0]
for i in range(0,n-2):
    sum += min(a[i],a[i+1])

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

S = []
for i in range(N):
	S.append(input())

print(len(S))
# Judge status: Accepted
N = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

diff = [a[i] - b[i] for i in range(N)]
plus = sum(filter(lambda x: x > 0, diff))
minus_even = sum(filter(lambda x: x < 0 and x % 2 == 0, diff))
minus_odd = sum(x + 1 for x in diff if x < 0 and x % 2 == 1)

# print(plus)

if plus * 2 + minus_even + minus_odd > 0:
    print('No')
else:
    print('Yes')
# Judge status: Accepted
class Solution:
    def solve(self, A: int, B: int, C: int) -> str:

        s = sorted([A, B, C])

        return s[0] + s[1] + 10*s[2]


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(A, B, C))
# Judge status: Accepted
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=INT()
    s=STR()
    if a<3200:
        print('red')
    else:
        print(s)
if __name__ == '__main__':
    do()
# Judge status: Wrong Answer
n, m = map(int, input().split())
if n % 2:
    n -= 1
    for i in range(m):
        print(i+1, n-i)
else:
    for i in range(m):
        if i == m-1: print(i+1, n-i-1)
        else: print(i+1, n-i)
# Judge status: Accepted
s = input()
n = len(s)
k = 'keyence'
for i in range(7):
    if s[i] != k[i]:
        break
else:
    i += 1
tmp = i
for i in range(7):
    if s[n - i - 1] != k[6 - i]:
        break
else:
    i += 1
if i + tmp >= 7:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
N, num_of_blue, num_of_red = map(int, input().split())

num_of_repetition = (N // (num_of_blue + num_of_red))
remainder_s = N % (num_of_blue + num_of_red)

count_b = num_of_blue * num_of_repetition + min(num_of_blue, remainder_s)

print(count_b)
# Judge status: Wrong Answer
S = input()

ans = 0
cnt = 0
for i in S:
    if i in ("A","C","G","T"):
        cnt += 1
    else:
        ans = max(ans,cnt)
        cnt = 0
print(ans)
# Judge status: Wrong Answer
x=input()
print(x+'s' if x[len(x)-1]!='s' else x[0:len(x)-1]+"es")
# Judge status: Wrong Answer
K = int(input())
if K%2 ==0:
    print(int(K/2+1))
elif K%2 !=0:
    print(int((K+1)/2))
# Judge status: Accepted
import math

h = int(input())
n = int(math.log2(h))
 
a = 2
r = 2
S = (a*(r**n)-a) // (r-1)
print(S + 1)
# Judge status: Wrong Answer
N, D = map(int, input().split())
A = 0
for point in range(N):
    p, q = map(int, input().split())
    dis = q**2 + q**2
    if(dis <= D**2):   
        A += 1

print (A)
# Judge status: Wrong Answer

n = str(input())

print('Good' if len(set(n))==4 else 'Bad')
# Judge status: Accepted
n=int(input())
s=input()
ans=0
tmp=0
for i in range(n):
    if s[i]=="I":
        tmp+=1
        ans=max(ans,tmp)
    else:
        tmp-=1
print(ans)
# Judge status: Accepted
def main():
    n, x, *a = map(int, open(0).read().split())
    a = [0] + a
    ans = 0
    tmp = 0
    for i, j in zip(a, a[1:]):
        i -= tmp
        if (i + j - x) > 0:
            c = (i + j - x)
            ans += c
            tmp = c
        else:
            tmp = 0

    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
def f(exponent):
	#reurns how many times a prime raised to exponent can be used
	lo,hi = 1, exponent + 1
	while(lo < hi):
		med = (lo + hi)/2
		if med * (med + 1)/2 > exponent:
			hi = med
		else:
			lo = med +1
	return lo -1

def answer(n):
	if n == 1: return 0
	res = 0
	for d in range(2, int(n ** 0.5) + 2):
		if n % d == 0:
			e = 0
			while(n%d == 0): 
				e +=1
				n/=d
			res+= f(e)
	if n > 1: res += 1
	return res

print answer(int(raw_input()))
# Judge status: Wrong Answer
H, A = map(int, input().split())

print(H  // A + 1)
# Judge status: Wrong Answer
def main():
  s = list(map(int,input().split()))
  n = [0]*s[0]
  for k in range(1,s[1],1):
    d = int(input())
    a = list(map(int,input().split()))
    #print(a)
    for i in range(0,d,1):
      #print(a[i])
      n[a[i]-1] = 1
      #print(n)
      
  sum=0
  #print(n)
  
  for k in range(0,s[0],1):  
    if(n[k]==0): sum = sum+1
 
  print(sum)
  
main()
# Judge status: Accepted
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
Ds = list(mapint())
mod = 998244353
from collections import Counter

c = Counter(Ds)
if Ds[0]!=0:
    print(0)
elif c[0]>1:
    print(0)
else:
    ans = 1
    for i in range(1, N):
        ans *= pow(c[i-1], c[i], mod)
        ans %= mod
    print(ans)
# Judge status: Accepted
n = int(input())

def calc(x_list):
    tmp  = []
    for x in x_list:
        m = max(x)
        for alpha in range(ord('a'), ord(m) + 2):
            tmp.append(x + chr(alpha))
    if len(tmp[-1]) < n:
        tmp = calc(tmp)
    return tmp

ans = calc(['a'])
ans.sort()
if n >= 2:
    print(*ans, sep="\n")
else:
    print('a')
# Judge status: Wrong Answer
w,a,b = map(int,input().split())

if b < a:
  print(a-b)
elif a <= b <= a+w:
  print("0")
elif a+w < b:
  print(b - (a+w))
# Judge status: Accepted
from collections import defaultdict

N, K = map(int, input().split())

A = [int(x) - 1 for x in input().split()]

cur = 0
step = 0
d = defaultdict(int)
d[0] = step
li = []
while True:
    cur = A[cur]
    li.append(cur)
    if d[cur] != 0:
        break
    step += 1
    d[cur] = step

pre = li[:d[cur]]
loop = li[d[cur]:]

if K <= len(pre):
    print(pre[K - 1] + 1)
else:
    K -= len(pre) + 1
    print(loop[K % (len(loop))] + 1)
# Judge status: Wrong Answer
ds=str(input())
ds=ds.replace("2017","2018")
# Judge status: Accepted
x = int(input())

x_ = divmod(x, 100)

if 5*x_[0] >= x_[1]:
    print(1)
else:
    print(0)
# Judge status: Accepted
import itertools
import math
n = int(input())
p  = list(map(int, input().split()))
q  = list(map(int, input().split()))
lst = []
for i in range(1, n+1):
    lst.append(i)
a =  list(itertools.permutations(lst))
p_c = a.index(tuple(p))
q_c = a.index(tuple(q))
print(int(math.fabs(q_c-p_c)))
# Judge status: Accepted
from fractions import gcd

n = int(input())
a_list = [int(x) for x in input().split()]

ans = a_list[0]
for i in range(1, n):
    ans = gcd(ans, a_list[i])
print(ans)
# Judge status: Wrong Answer
N, K = map(int,input().split())

ans = 0

if N >= K:
    ans += (N - K + 1) / N
    L = K-1
else:
    L = N



for i in range(1,L+1,1):
    ans_i = 0
    score = i
    c = 0
    
    while score <= K:
        score = score * 2
        c += 1
    rate = (1 / N)*((1/2)** c)
    ans += rate
    #print(ans)

print(ans)
# Judge status: Accepted
L,R,d = map(int,input().split())
ans=0
for i in range(L,R+1):
  if (i%d == 0):
    ans+=1
    
print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
num_list = list(map(int,input().split()))
ans = 10e12
for i in range(n-k+1):
    left = num_list[i]
    right = num_list[i+k-1]
    if (right <= 0) and (left <= 0):
        tmp = abs(left)
    elif (right >= 0) and (left <= 0):
        tmp = min(abs(right) , abs(left)) + abs(right) + abs(left)
    elif (right >= 0) and (left >= 0):
        tmp = abs(right)
    if tmp < ans:
        ans = tmp
print(ans)
# Judge status: Accepted
#!/usr/bin/env python3
n, m, *a = map(int, open(0).read().split())
if sum(a) >= n:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
l,r,d = map(int,input().split())

mod = l % d
cnt = 0
for i in range(mod+l,r+1,d):
  cnt += 1
  
print(cnt)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
nums = {0:0,1:0,2:0,3:0}
for i in range(n):
    num = a[i] % 4
    nums[num] += 1
if nums[2] % 2 == 0:
    if nums[1] + nums[3] - 1 <= nums[0]:
        print("Yes")
    else:
        print("No")
elif nums[2] % 2 == 1:
    if nums[1] + nums[3] <= nums[0]:
        print("Yes")
    else:
        print("No")
# Judge status: Wrong Answer
s,t = input().split()
a,b = map(int, input().split())
u = input()

if u == s:
    a+=1
else:
    b+=1

print(a,b)
# Judge status: Accepted
N,K=map(int,input().split())
A=list(map(int,input().split()))
#最終的にすべて同じ値になるなら、最小値のほうから攻めるべき
#早いソートにしたほうがいいかも。2部探索とか
mini_index=A.index(1)
if N<=K:
    print(1)
else:
    length=K
    count=1
    while(True):
        length+=K-1
        count+=1
        if length>=N:
            print(count)
            break
# Judge status: Wrong Answer
from heapq import heappush,heappop

N,M = list(map(int,input().split()))
A = list(map(int,input().split()))
change = [list(map(int,input().split())) for _ in range(M)]

def tempchange(l,change):
  for i in range(M):
    B,C = change[i][0],change[i][1]
    for j in range(B):
      a = heappop(l)
      dif = C - a
      if dif > 0:
        heappush(l,C)
      else:
        heappush(l,a)
  return sum(l)

#A.sort(reverse = True)
change.sort(key = lambda x:x[1],reverse =True)
print(tempchange(A,change))
# Judge status: Wrong Answer
import numpy as np
n,*a=map(int,open(0).read().split())
mod=10**9+7
a=np.array(a)
b0=np.array([0 for i in range(60)])
b1=np.array([0 for i in range(60)])
for i in range(60):
  c=len(a[a&1==1])
  b1[i]=c
  b0[i]=n-c
  a>>=1
ans=0
for i in range(60):
  ans+=(b0[i]*b1[i]*pow(2,i,mod))
  ans%=mod
print(ans)
# Judge status: Accepted
[K,S] = list(map(int,input().split()))

count=0
for X in range(K+1):
    for Y in range(K+1):
        Z = S - X - Y
        if Z in range(K+1):
            count+=1

print(count)
# Judge status: Accepted
# B - Bishop

H, W = map(int, input().split())

ans = W * (H//2)
if H&1:
    ans += (W+1)//2

if H == 1 or W == 1:
    ans = 1

print(ans)
# Judge status: Wrong Answer
from itertools import accumulate
N = int(input())
A = tuple(accumulate(map(int, input().split())))
x = A[-1]
y = A[0]
ans = abs(x - y - y)
for a in A:
    ans = min(ans, abs(x - a - a))
print(ans)
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
flag = False
for i in range(n):
    if a[i] % 2 == 0:
        if a[i] % 3 == 0 or a[i] % 5 == 0:
            flag = True
        else:
            flag = False
            break

if flag:
    print("APPROVED")
else:
    print("DENIED")
# Judge status: Accepted
a,b,c = map(int,input().split())
if a <= c <= b:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
import sys
import numpy as np
import math
from collections import deque 
from functools import reduce

# input = sys.stdin.readline

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

x2 = y // 2
xe = y // 4

if (x <= x2 and x >= xe):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
import numpy as np
X, N = map(int, input().split())
if N == 0:
    print(X)
else:
    l = list(map(int, input().split()))
    app = [x for x in range(X - int(N / 2) - 1, X + int(N / 2) + 1) if x not in l]
    print(app[np.argmin([abs(x - X) for x in app])])
# Judge status: Wrong Answer
h1,m1,h2,m2,k=map(int,input().split())
h3=abs(h2-h1)
print(h3*60-k)
# Judge status: Accepted
ans=1
for i in range(1,int(input())+1):
  ans=ans*i%(10**9+7)
print(ans)
# Judge status: Accepted
import collections
n,k=map(int,input().split())
a=list(map(int,input().split()))
a_counter=collections.Counter(a)
a_count=a_counter.most_common()
answer = 0
# print(a_counter)
for i in range(k, len(a_count)):
    # print(a_count[i])
    answer += a_count[i][1]

print(answer)
# Judge status: Wrong Answer
AV = list(map(int,input().split()))
BW = list(map(int,input().split()))
T = int(input())

A = AV[0]
V = AV[1]
B = BW[0]
W = BW[1]

for i in range(T):
    if A <= B:
        B += W
        A += V
    else:
        B -= W
        A -= V

if abs(A) >= abs(B):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a=[input(),input(),input()]
now=0
while a[now]:
    y=a[now][0];a[now]=a[now][1:];now=ord(y)-ord('a')
print("ABC"[now])
# Judge status: Accepted
s = input()
n = len(s)
s0 = "01" * (n//2)
s1 = "10" * (n//2)
if n % 2 == 1:
  s0 += "0"
  s1 += "1"

a0 = 0
a1 = 0
for i in range(n):
  if s[i] != s0[i]:
    a0 += 1
  if s[i] != s1[i]:
    a1 += 1
print(min(a0, a1))
# Judge status: Accepted
k = [1,3,1,2,1,2,1,1,2,1,2,1]
N,M = map(int,input().split())
if k[N-1] == k[M-1]:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n,m=map(int, input().split())
if m%2==1:
    for i in range(m//2):
        print(i+1,m-i)
    for i in range(m//2+1):
        print(m+i+1,2*m+1-i)
else:
    for i in range(m//2):
        print(i+1,m+1-i)
    for i in range(m//2):
        print(m+i+2,2*m+1-i)
# Judge status: Accepted
K, S = map(int, input().split())
count = 0

for x in range(K+1):
    for y in range(K+1):
        z = S - x - y
        if 0 <= z <= K:
            count += 1

print(count)
# Judge status: Accepted
import math
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))
# Judge status: Accepted
n=int(input())
d={i:0 for i in range(1,n+1)}
l=list(map(int,input().split()))
for i in range(1,n):
	d[l[i-1]]+=1
for i in d:
	print(d[i])