Harryxun/stf_run huggingface dataset:
X, N = map(int, input().split())
if N == 0:
    print(X)
    exit()
else:
    P = list(map(int, input().split()))

n_P = []

for i in range(1, 100):
    if i not in P:
        n_P.append(i)

n_P.sort()
INF = 10 ** 9
diff = INF
ans = INF

for p in n_P:
    if abs(X-p) < diff:
        diff = abs(X-p)
        ans = p

if abs(X-ans) > abs(X-n_P[-1]+1):
    ans = n_P[-1] + 1
if abs(X-ans) > abs(X-n_P[0]-1):
    ans = n_P[0] - 1

print(ans)


### FIXED CODE ###

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

n_P = []

for i in range(1, 100):
    if i not in P:
        n_P.append(i)

n_P.append(0)
n_P.append(101)

n_P.sort()
INF = 10 ** 9
diff = INF
ans = INF

for p in n_P:
    if abs(X-p) < diff:
        diff = abs(X-p)
        ans = p

print(ans)
T = list(str(input()))

for i in range(len(T)):
    if T[i] == '?'

print(''.join(T))


### FIXED CODE ###

T = list(str(input()))

for i in range(len(T)):
    if T[i] == '?':
        T[i] = 'D'
    print(T[i],end='')
x=input()
x=list(x)
t=0
k=0
while t==0:
	if x[k]!="1":
		t=x[k]
	k=k+1
print(t)

### FIXED CODE ###

x=input()
m=int(input())
x=list(x)

if len(x)<m:
	m=len(x)
t=1
for i in range(m):
	if x[i]!='1' and t==1:
		t=x[i]
t=int(t)
print(t)
import  numpy as np
N=int(input())
A=list(map(int,input().split()))

B=np.argsort(A)

print(' '.join(map(str,B+1)))

### FIXED CODE ###

import numpy as np
N=int(input())
A=list(map(int,input().split()))

B=np.argsort(A)+1

print(' '.join(map(str,B)))
#!/usr/bin/env python3
# coding=utf-8

import sys
import numpy as np


def culc_pos(x, y, commands, pos=np.matrix([0, 0]), d=np.matrix([1, 0])):
    if len(commands) == 1:
        if not commands[0]:
            pos = pos + d
        return pos[0, 0] == x and pos[0, 1] == y
    if commands[0]:
        ccw = np.matrix([[0, -1], [1, 0]])
        cw = np.matrix([[0, 1], [-1, 0]])
        d1 = d * ccw
        d2 = d * cw
        return culc_pos(x, y, commands[1:], pos, d1) or culc_pos(x, y, commands[1:], pos, d2)
    else:
        pos = pos + d
        return culc_pos(x, y, commands[1:], pos, d)


s = sys.stdin.readline().strip()
x, y = sys.stdin.readline().strip().split(" ")
x = int(x)
y = int(y)
s_list = [_s == "T" for _s in list(s)]
if culc_pos(x, y, s_list):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

#!/usr/bin/env python3
# coding=utf-8

import sys

s = sys.stdin.readline().strip().split("T")
x, y = sys.stdin.readline().strip().split(" ")
x = int(x)
y = int(y)
move_all = [len(_s) for _s in s]
pos_x = set([move_all[0]])
pos_y = set([0])
move_x = move_all[2::2] or None
move_y = move_all[1::2] or None
if move_x:
    for move in move_x:
        pos_x = {_x + move for _x in pos_x} | {_x - move for _x in pos_x}
if move_y:
    for move in move_y:
        pos_y = {_y + move for _y in pos_y} | {_y - move for _y in pos_y}
if x in pos_x and y in pos_y:
    print("Yes")
else:
    print("No")
N,X=map(int,input().split())
L=list(map(int,input().split()))

D=L[0]
i=1
count=1

if D>X:
    print(0)
else:
    while D<=X and i<=N:
        D+=L[i]
        i+=1
        count+=1
    print(count)
    

### FIXED CODE ###

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


if L[0]>X:
    print(1)
else:
    D=0
    i=0
    count=1
    while D<=X and i<=N-1:
        if D+L[i]<=X:
            D+=L[i]
            i+=1
            count+=1
        else:
            break
    print(count)
n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(4800//400)]
for i in a:
    b[i//400] += 1;
t = 0
ans = 0
for i in range(4800//400):
    if b[i] > 0:
        if i < 3200//400:
            ans+=1
        else:
            t+=b[i]
if ans > 0:
    print(ans,t+ans)
else:
    print(1,t)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = [0 for i in range(4800//400 + 1)]
for i in a:
    b[i//400] += 1;
t = 0
ans = 0
for i in range(4800//400 + 1):
    if b[i] > 0:
        if i < 3200//400:
            ans+=1
        else:
            t+=b[i]
if ans > 0:
    print(ans,t+ans)
else:
    print(1,t)
N = int(input())

if N % 2 == 0:
  print(N/2)
else:
  print(N//2　+1)

### FIXED CODE ###

N = int(input())

if N % 2 == 0:
  print(int(N/2))
else:
  print(int(N//2 +1))
n, k = map(input().spilt())
y = 1
while n > 1:
    y += 1
    n = n // k
print(y)

### FIXED CODE ###

n, k = map(int, input().split())
i = k
y = 1
while n >= i:
    y += 1
    i *= k
print(y)
n=int(input())
a=[int(i)for i in input().split())]
x=0
for i in a:
    x+=1/i
print(1/x)

### FIXED CODE ###

n=int(input())
a=[int(i)for i in input().split()]
x=0
for i in a:
    x+=1/i
print(1/x)
k,a,b = map(int,input().split())
n=1
e=0
for i in range(k):
    if (k-i)%2=0:
        
        if e=1:
            n=n+b
            continue
        if n>=a:
            e=1
            n=n-a
            continue
    else
        n=n+1
        continue
print(n)
    

### FIXED CODE ###

k, a, b = map(int, input().split())
x=k+1
y=0
if b>a:
    c=b-a
    k-=a-1
    y=c*(k//2-1)+b+(k%2)
print(max(x,y))
a,b,c = map(int,input().split())
if a = b and b = c:
  print(1)
elif a = b or b = c or a = c:
  print(2)
else:
  print(3)


### FIXED CODE ###

a,b,c = map(int,input().split())
if a==b and b==c:
  print(1)
elif a==b or b==c or a==c:
  print(2)
else:
  print(3)
n = int(input())
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))
c_list = list(map(int, input().split()))

score = 0

for val in b_list :
	score +=val
	
for val in range(n-1):
	if a_list[val+1] - a_list[val] == 1:
		score += c_list[a_list[val-1]]
	else:
		pass

print(score)

### FIXED CODE ###

n = int(input())

m = n**3

print(m)
N,M = map( int, input().split() )
break_list = []
for i in range(M):
    break_list.append( int( input() ) )
   
fib = [0] * (N + 1)
if 1 in break_list:
    fib[1] = 0
else:
    fib[1] = 1
    
if 0 in break_list:
    print(0)
else:
    fib[0] = 1
    for i in range(N - 1):
        if i + 2 in break_list:
            fib[i + 2] = 0
        else:
            fib[i + 2] = fib[i] + fib[i + 1]

    print( fib[i+2] %  1000000007 )

### FIXED CODE ###

N,M = map( int, input().split() )
break_list = []
for i in range(M):
    break_list.append( int( input() ) )

break_list.append(-10)
t = 0
fib = [0] * (N + 1)
if break_list[0] == 1:
    fib[1] = 0
    t += 1
else:
    fib[1] = 1
    
fib[0] = 1

for i in range(N - 1):
    if ( i + 2 ) ==  break_list[t]:
        fib[i + 2] = 0
        t += 1
    else:
        fib[i + 2] = fib[i] + fib[i + 1]
 
if N == 1:
    print( fib[1] )
else:
    print( fib[i+2] %  1000000007 )
class unionFind():
	def __init__(self,n):
		self.tree=[-1]*n
	def find(self,x):
		if self.tree[x]<0:
			return x
		else:
			self.tree[x]=self.find(self.tree[x])
			return self.tree[x]
	def union(self,x,y):
		xr=self.find(x)
		yr=self.find(y)
		if xr!=yr:

			if self.tree[xr]==self.tree[yr]:
				self.tree[xr]-=1
				self.tree[yr]=xr
			else:
			    if self.tree[xr]>self.tree[yr]:
					self.tree[xr]=yr
				else:
					self.tree[yr]=xr
			return True
		
		return False
def main():
	ans=0
	n,m=map(int,input().split())
	a=unionFind(n)
	li=[x-1 for x in list(map(int,input().split()))]
	for _ in range(m):
		x,y=map(int,input().split())
		a.union(x-1,y-1)
	for x in range(n):
		ans += a.find(x)==a.find(li[x])
	return ans
print(main())







### FIXED CODE ###

from collections import defaultdict
import sys
sdin = sys.stdin.readline

class UnionFind:
    def __init__(self, node:int) -> None:
        self.n = node
        self.par = [i for i in range(self.n)]
        self.rank = [0 for i in range(self.n)]
        
    def find(self, x:int) -> int:
        if x == self.par[x]:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]
        
    def unite(self, x:int, y:int) -> bool:
        if self.isSame(x,y):
            #print("x and y has already united")
            return False
        
        rx = self.find(x)
        ry = self.find(y)
        
        if self.rank[rx] < self.rank[ry]:
            self.par[rx] = ry
        else:
            self.par[ry] = rx
            
            if self.rank[rx] == self.rank[ry]:
                self.rank[rx] += 1
                
        return True
    
    def isSame(self, x:int, y:int) -> bool:
        return self.find(x) == self.find(y)

    

        
N, M = map(int, sdin().split())
P = list(map(int, sdin().split()))
XY = []
for i in range(M):
    XY.append(list(map(int, sdin().split())))


root_node = defaultdict(list)

uf = UnionFind(N)
for x,y in XY:
    x -= 1
    y -= 1
    uf.unite(x,y)

for i in range(N):
    uf.find(i)
    
par = uf.par

for i,root in enumerate(par):
    root_node[root].append(i)
    
ans = 0
for node_list in root_node.values():
    num_list = []
    for i in node_list:
        num_list.append(P[i]-1)
    
    ans += len(set(node_list)&set(num_list))
            
print(ans)
n,x = (int(i) for i in input().split())
def pc(n,k):
	if k==1: return 0
	elif k<2**(n+1)-1: return pc(n-1,k-1)
	elif k==2**(n+1)-1: return 2**n
	else: return 2**n+pc(n-1,k-2**(n+1)+1)
print(pc(n,x))

### FIXED CODE ###

n,x = (int(i) for i in input().split())
def pc(n,k):
	if n and k==1: return 0
	elif k==1: return 1
	elif k<2**(n+1)-1: return pc(n-1,k-1)
	elif k==2**(n+1)-1: return 2**n
	elif k<2**(n+2)-3: return 2**n+pc(n-1,k-2**(n+1)+1)
	else: return 2**(n+1)-1
print(pc(n,x))
1 b = input()
2 c = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
3 print(c[b])

### FIXED CODE ###

b = input()
c = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C'}
print(c[b])
S = input()
K = int(input())
if len(S) <= K:
  print(S[:K] + '...')
else:
  print(S)

### FIXED CODE ###

K = int(input())
S = input()
if len(S) > K:
  print(S[0:K] + '...')
else:
  print(S)
n, k = map(int, input().split())
h = list(map(int, input().split()))
c = [0] * n
for i in range(1, n):
    x=h[i]
    c[i] = min([c[j]+abs(x-h[j]) for j in range(max(0, i-k), i)])
print(c[n-1])


### FIXED CODE ###

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

cost = [0] * (n + 1)
cost[0] = 0
cost[1] = abs(h[1] - h[0])

for i in range(2, n):
  cost1 = cost[i-2] + abs(h[i] - h[i-2])
  cost2 = cost[i-1] + abs(h[i] - h[i-1])
  cost[i] = min(cost1, cost2)
print(cost[n-1])
a, b, c= map(int, input().split())
print(min(a//b, c)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(min(b//a, c))
a,b = map(int,input().split())
print(math.gcd(a, b))

### FIXED CODE ###

a,b = map(int,input().split())
x=max(a,b)
y=min(a,b)

def gcd(m,n):
    x=max(m,n)
    y=min(m,n)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z

ans=a*b/gcd(a,b)
print(int(ans))
import math
n, d, a = map(int,input().split())
e = [[] for i in range(n)]
for i in range(n):
    x, h = map(int,input().split())
    e[i] = [x,h]
num = 0

e.sort()
sd = [0 for i in range(n)]
l = [i for i in range(n)]
for i in range(n):
    for j in range(l[i-1],i):
        if e[i][0]-e[j][0] <= 2*d:
            l[i] = j
            break

for i in range(n):
    res = x[i][1] - sd[i-1] + sd[l[i]-1]
    if res < 0:
        sd[i] = sd[i-1]
    else:
        k = math.ceil(res/a)
        sd[i] = sd[i-1]+k*a
        num += k
        
print(num)


### FIXED CODE ###

import math
n, d, a = map(int,input().split())
e = [[] for i in range(n)]
for i in range(n):
    x, h = map(int,input().split())
    e[i] = [x,h]
num = 0

e.sort()
sd = [0 for i in range(n)]
l = [i for i in range(n)]
for i in range(n):
    for j in range(l[i-1],i):
        if e[i][0]-e[j][0] <= 2*d:
            l[i] = j
            break

for i in range(n):
    res = e[i][1] - sd[i-1] + sd[l[i]-1]
    if res < 0:
        sd[i] = sd[i-1]
    else:
        k = math.ceil(res/a)
        sd[i] = sd[i-1]+k*a
        num += k

print(num)
# -*- coding: utf-8 -*-
import math

def make_divisor_list(num,tar):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        i = 2
        while i*i <= num:

            if num % i == 0 and i*i <= num:
                divisor_list.append(i)
                divisor_list.append(num//i)
            i += 1
        divisor_list.append(num)
        return divisor_list
def binary_search_loop(li,tar):
    arry = li
    target = tar

    left = 0
    right = len(arry)

    while left <= right:

        mid = (left + right) // 2
        if arry[mid] ==  target:
            break
        elif arry[mid] > target:
            right = mid
        else:
            left = mid
        if right - left == 1:
            mid += 1
            break

#    print(mid)
    return mid

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

li = make_divisor_list(M,M//N)
li = sorted(li)
mid = binary_search_loop(li,M//N)


ans = 0
i = max(0,mid-10)
while True:
    if li[i]>=N:
        tmp = M//li[i]
        if tmp >= ans:
            ans = tmp
        else:
            break

    i += 1
print(ans)
# print(li)

# ans = 1
# for l in li[::-1]:
#     if l >= N:
#         ans = max(ans,M//l)
#     if ans >= l:
#         break

# i = 1
# ans = 0
# tmp = 1000000000

# if M%N == 0:
#     ans = max(ans,M//N)
#     print(ans)
#     exit()

# while M//i >= i and N > i and i <= tmp:
#     if M%i == 0:
#         if tmp == 1000000000:
#             tmp = M//i
#         if M//i >= N:
#             ans = max(ans,i)
#     i += 1

#print(ans)


### FIXED CODE ###

N,M = map(int,input().split())
ans = 1
i = 1
while i*i <= M:
    if M%i == 0 and M//N >= i:
        ans = max(ans,i)
        if M //i *N <= M:
            ans = max(ans,M//i)
    i += 1
print(ans)
n=int(input())
s=input()
ans=0
for i in range(n-1):
  ans+=1
  for j in range(i+1,n+1):
    if s[i]==s[j]:
      break
    ans+=1
  ans%=(10**9+7)
ans+=1
ans%=10**9+7
print(ans)


### FIXED CODE ###

n=int(input())
s=input()
mod=10**9+7
ans=1
lets=[1]*26
for i in s:
  lets[ord(i)-97]+=1
for i in range(26):
  ans*=lets[i]
  ans%=mod
print(ans-1)
x = input()
x = int(x)

for i in len(x):
    if x == 0:
        break
    else:
        print("Case", i+1, ":", x)



### FIXED CODE ###

for i in range(10000):
    x = input()
    x = int(x)
    
    if x == 0:
        break
    else:
        print("Case "+ str(i+1) + ": " + str(x))
or i in range(1,10):
    for r in range(1,10):
        print "%s*%s=%s" % (i,r,i*r)

### FIXED CODE ###

for i in range(1,10):
    for r in range(1,10):
        print "%sx%s=%s" % (i,r,i*r)
a = input()
b = input()

print('{0} {1}'.format(a*b,2*(a+b)))

### FIXED CODE ###

a,b = map(int,input().split())
print(a*b,a*2+b*2)
a, b, c, k = list(map(int, input().split()))
if a > k:
	print(sum(([1] * a)[:k]))
else:
	print(sum([1] * a))

### FIXED CODE ###

t,s = [str(input()) for _ in range(2)]
if s[:-1] == t:
	print('Yes')
else:
	print('No')
H, W, m = map(int, input().split())
hs = [0] * (H+1)
ws = [0] * (W+1)
fs = [[0]*(W+1) for i in range(H+1)]
for i in range(m):
    hi,wi = map(int, input().split())
    hs[hi-1] += 1
    ws[wi-1] += 1
    fs[hi-1][wi-1] += 1

N = 10**6
hmx = max(hs)
hset = set()
for h in hs:
    if h == hmx:
        hset.add(h)
wmx = max(ws)
wset = set()
for w in ws:
    if w == wmx:
        wset.add(w)

flg = False
ans = 0
cnt = 0
for i in hset:
    for j in wset:
        ans = max(ans, hmx+wmx-fs[i][j]) 
        if cnt >= m:
            flg = True
            break
        cnt += 1
    if flg:break

print(ans)

### FIXED CODE ###

H, W, m = map(int, input().split())
hs = [0] * (H+1)
ws = [0] * (W+1)
from collections import defaultdict
d = defaultdict(bool)
N = 10**6
for i in range(m):
    hi,wi = map(int, input().split())
    hi -= 1
    wi -= 1
    hs[hi] += 1
    ws[wi] += 1
    d[hi*10**6+wi] = True

hmx = max(hs)
hset = set()
for i,h in enumerate(hs):
    if h == hmx:
        hset.add(i)
wmx = max(ws)
wset = set()
for j, w in enumerate(ws):
    if w == wmx:
        wset.add(j)

flg = False
ans = 0
cnt = 0
for i in hset:
    for j in wset:
        ans = max(ans, hmx+wmx-d[i*N+j]) 
        if cnt >= m:
            flg = True
            break
        cnt += 1
    if flg:break

print(ans)
n=int(input())
h = list(map(int,input().split()))
i=0
m=0
count = 0

for i in range (n):
    if h[i]>=h[i+1]:
        count += 1
    else:
        m = max(m,count)
        count = 0    
m = max(m,count)            
print(m)



### FIXED CODE ###

n=int(input())
h = list(map(int,input().split()))
m=0
count = 0

for i in range (n-1):
    if h[i]>=h[i+1]:
        count += 1
    else:
        m = max(m,count)
        count = 0
m = max(m,count)
print(m)
n,k = list(map(int,input().split()))
arr = list(map(int,input().split()))
arr.sort()
print(sum(arr[:k])

### FIXED CODE ###

n,k = list(map(int,input().split()))
arr = list(map(int,input().split()))
arr.sort()
print(sum(arr[:k]))
from numpy import array
n=int(input())
s=input()
t=s.count("E")
r=s.count("W")
dp =[r-(s[-1]=="W")]+[0 for i in range(n-1)]
dp2=[t-(s[0 ]=="E")]+[0 for i in range(n-1)]

for i in range(1,n):
    if s[i]=="W":
        dp2[i]=dp2[i-1]
    else:
        dp2[i]=dp2[i-1]-1
    if s[::-1][i]=="E":
        dp[i]=dp[i-1]
    else:
        dp[i]=dp[i-1]-1
print(min(array(dp[::-1])+array(dp2)))

### FIXED CODE ###

from numpy import*
n=int(input())
s=input()
x=[0]+[1 if i=="W" else 0 for i in s]
del x[-1]
y=[1 if i=="E" else 0 for i in s]
print(min(array(cumsum(x))+s.count("E")-array(cumsum(y))))
a = raw_input()
b = raw_input()

if a>b:
 print "a>b"
if a<b:
 print "a<b"
else:
 print "a==b"

### FIXED CODE ###

a,b = map(int, raw_input().split())

if a>b:
 print "a > b"
elif a<b:
 print "a < b"
else:
 print "a == b"
n = int(input())
for i in range(1, n+1):
  if i%3!=0 and i%5!=0:
    a+=i
print(i)

### FIXED CODE ###

n = int(input())
a=0
for i in range(1, n+1):
  if i%3!=0 and i%5!=0:
    a=a+i
print(a)
from collections import deque

N = int(input())
A = [int(i) for i in input().split()]
 
B = deque(maxlen=2*10**5)
 
if N % 2 == 0:
    for i in range(N):
        if i % 2 == 0:
            B.append(A[i])
        else:
            B.insert(0,A[i])
else:
    for i in range(N):
        if i % 2 == 0:
            B.insert(0,A[i])
        else:
            B.append(A[i])

print(*B)

### FIXED CODE ###

from collections import deque

N = int(input())
A = [int(i) for i in input().split()]

B = deque(maxlen=2*10**5)

if N % 2 == 0:
    for i in range(N):
        if i % 2 == 0:
            B.append(A[i])
        else:
            B.appendleft(A[i])
else:
    for i in range(N):
        if i % 2 == 0:
            B.appendleft(A[i])
        else:
            B.append(A[i])

print(*B)
import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

if x < y:
    x, y = y, x

b = (2 * x - y) // 3 
if (2 * x - y) % 3  != 0:
    print(0)
    exit()

a = x - 2 * b

MOD = 10 ** 9 + 7
a %= MOD
b %= MOD

MAX = 10 ** 6 + 10
fac = [0 for i in range(MAX)]
finv = [0 for i in range(MAX)]
inv = [0 for i in range(MAX)]

def comInit(mod):
    fac[0], fac[1] = 1, 1
    finv[0], finv[1] = 1, 1
    inv[1] = 1
    for i in range(2, MAX):
        fac[i] = fac[i - 1] * i % mod
        inv[i] = mod - inv[mod % i] * (mod // i) % mod
        finv[i] = finv[i - 1] * inv[i] % mod

def com(n, r, mod):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n - r] % mod) % mod
    
comInit(MOD)

print(com(a + b, b, MOD))

### FIXED CODE ###

import sys
import itertools
# import numpy as np
import time
import math

sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

if x < y:
    x, y = y, x

b = (2 * x - y) // 3 
if (2 * x - y) % 3  != 0:
    print(0)
    exit()

a = x - 2 * b
if a < 0:
    print(0)
    exit()

MOD = 10 ** 9 + 7
a %= MOD
b %= MOD

MAX = 10 ** 6 * 2 + 2
fac = [0 for i in range(MAX)]
finv = [0 for i in range(MAX)]
inv = [0 for i in range(MAX)]

def comInit(mod):
    fac[0], fac[1] = 1, 1
    finv[0], finv[1] = 1, 1
    inv[1] = 1
    for i in range(2, MAX):
        fac[i] = fac[i - 1] * i % mod
        inv[i] = mod - inv[mod % i] * (mod // i) % mod
        finv[i] = finv[i - 1] * inv[i] % mod

def com(n, r, mod):
    if n < r:
        return 0
    if n < 0 or r < 0:
        return 0
    return fac[n] * (finv[r] * finv[n - r] % mod) % mod
    
comInit(MOD)
print(com(a + b, b, MOD))
a,b = map(int,input().split())

if a*b%2 == 0
     print (Even)
else:
     print (Odd)

### FIXED CODE ###

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

if a*b%2 == 0:
     print ('Even')
else:
     print ('Odd')
K, X = map(int, input().split())
    if 500 * K >= X:
        print('Yes')
    else:
        print('No')

### FIXED CODE ###

K, X = map(int, input().split())
if 500 * K >= X:
    print('Yes')
else:
    print('No')
import math
x = input()
a = int(x[0])
b = float(x[1]) 

a *= 100
b *= 100
print(int(a * b // 10000))

### FIXED CODE ###

import decimal
a,b = input().split()

a = int(a)
b = decimal.Decimal(b) * 100

print(a * b // 100)
import math.gcd
a, b = map(int, input.split())
if gcd(a, b) != 1:
  print(b-a)
else:
  print(a+b)


### FIXED CODE ###

a, b = map(int, input().split())
if b%a==0:
  print(a+b)
else:
  print(b-a)
S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i)
    S.pop(i-1)
    i-=1
  else:
    i+=1

print(L-len(S))

### FIXED CODE ###

S = list(input())
SL = len(S)
L = len(S)
i = 1
while len(S)>1 and i<len(S):
  if int(S[i]) != int(S[i-1]):
    S.pop(i-1)
    S.pop(i-1)
    i-=1
  else:
    i+=1
  if i==0:
    i+=1
print(L-len(S))
d,n = map(int,input().split())
 
if d == 0:
    if n == 100:
        print(101)
  print(n)
else:
    if d == 1 and n == 100:
        print(10001)
  print(100*d*n)


### FIXED CODE ###

d,n = map(int,input().split())
 
if d == 0:
    if n == 100:
        print(101)
    else: 
        print(n)
else:
    if n == 100:
        print(pow(100,d)*(n+1)) 
    else:
        print(pow(100,d)*n)
N,M = map(int, input().split())

notcalled=list(range(1,N+1))
nets=[]
for _ in range(M):
    a,b=map(int, input().split())
    if a in notcalled and b in notcalled:
        nets.append([a,b])
        del notcalled[notcalled.index(a)]
        del notcalled[notcalled.index(b)]
    elif a in notcalled:
        for net in nets:
            if b in net:
                net.append(a)
        del notcalled[notcalled.index(a)]
    elif b in notcalled:
        for net in nets:
            if a in net:
                net.append(b)
        del notcalled[notcalled.index(b)]
    else:
        for net in nets:
            f=True
            if a in net or b in net:
                if f:
                    q=net.copy
                    del net
                else:
                    net.extend(q)

nets.extend(notcalled)
print(len(nets)-1)

### FIXED CODE ###

K=int(input())
print("ACL"*K)
count = int(input())
numbers = [int(num) for num in input().split()]

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter ++
  numbers = [item / 2 for item in numbers]
print(counter)

### FIXED CODE ###

count = int(input())
numbers = [int(num) for num in input().split()]

counter = 0
while True:
  tmp = 0
  for item in numbers:
    tmp += item % 2
  if tmp > 0:
    break
  counter += 1
  numbers = [item / 2 for item in numbers]
print(counter)
#Shift only
N = int(input())
A = list(map(int,input().split()))
count = [0]*N
for a in range(N):
    count_local = 0
    while A[a]%2 == 0:
        A[a] = A[a]/2
        count_local += 1
        if count_local >= count[a]:
            count[a] = count_local

print(min(count))

### FIXED CODE ###

print(input().count("1"))