peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
S=input()
n0,n1=0,0
for s in S:
  if s=='1':
    n1+=1
  elif s=='0':
    n0+=1
print(min(n1,n0))
# Judge status: Wrong Answer
n,k = map(int,input().split())
c = 0
for _ in range(n):
    a,b = map(int,input().split())
    c += b

    if k-1 < c:
        print (a)
        exit ()
# Judge status: Accepted
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

ri,sum=-1,0
for i in range(M):
    if sum+B[i]<=K:
        ri=i
        sum+=B[i]
    else :
        break

sum2,ans=0,ri+1
for i in range(N):
    sum2+=A[i]
    if sum2>K:
        break
    while ri>=0 and sum2+sum>K:
        sum-=B[ri]
        ri-=1
    ans=max(ans,i+1+ri+1)
print(ans)
# Judge status: Accepted
from fractions import gcd
n = int(input())
a = list(map(int, input().split()))
MOD = 10**9+7
if n == 1:
	print(1)
else:
	lcm = a[0] * a[1] // gcd(a[0], a[1])
	for x in a[2:]:
		lcm = lcm * x // gcd(lcm, x)
	lcm %= MOD
	ans = 0
	for x in a:
		ans += lcm * pow(x, MOD-2, MOD)
		ans %= MOD
	print(ans)
# Judge status: Accepted
a,s,t = map(str,input().split())
print("A"+s[0]+"C")
# Judge status: Wrong Answer
n, s = map(int, input().split())

if n>s:
	print("sefe")
else:
	print("unsafe")
# Judge status: Wrong Answer
H = int(input())
W = int(input())
N = int(input())

print(N // max(H,W))
# Judge status: Accepted
def main():
    K = int(input())
    v = 7 % K
    for i in range(K+5):
        if v == 0:
            print(i+1)
            return
        v = v * 10 + 7
        v %= K
    print(-1)


if __name__ == '__main__':
    main()
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
b = [0 for j in range(n)]

for i in range(n):
    b[a[i]-1] = i+1

print(*b)
# Judge status: Wrong Answer
N = int(input())
A = list(map(int, input().split()))
neg = sum([1 for i in range(N)  if A[i] < 0])
s = [abs(A[i]) for i in range(N)]
ans = sum(s)
if neg % 2 == 0:
  print(ans)
else:
  print(ans - min(s))
# Judge status: Accepted
N = int(input())
dp = [N] * (N + 1)
dp[0] = 0
for i in range(N):
    j = 1
    while i + j <= N:
        dp[i + j] = min(dp[i + j], dp[i] + 1)
        j *= 6
    j = 9
    while i + j <= N:
        dp[i + j] = min(dp[i + j], dp[i] + 1)
        j *= 9
print(dp[-1])
# Judge status: Wrong Answer
n = int(input())
a = [int(i) for i in input().split()]
a.sort(reverse=True)
b = list(set(a))
b.sort(reverse=True)
l = len(b)
c = [0 for _ in range(l)]
prei = b[0]
j = 0
for i in a:
    if i != prei:
        j += 1
    c[j] += 1
    prei = i
x = []
for i in range(l):
    if c[i] >= 2:
        x.append(b[i])
if len(x) >= 2:
    print(x[0] * x[1])
else:
    print(0)
# Judge status: Accepted
n=int(input())
a=int(n/1.08)
aa=a-1
aaa=a+1
b=int(a*1.08)
bb=int(aa*1.08)
bbb=int(aaa*1.08)
A=[a,aa,aaa]
B=[b,bb,bbb]
f=0
for i in range(3):
  if B[i]==n:
    f=1
    ans=A[i]
    break
if f==0:
  print(":(")
else:
  print(ans)
# Judge status: Wrong Answer
n=input()
ans=""
for i in n:
    if i=="?":
        ans=ans+"D"
    else:
        ans=ans+i
print(i)
# Judge status: Accepted
from math import floor

H = int(input())

def f(a):
  if a == 1:
    return 1
  else:
    return 1 + 2 * f(floor(a / 2))

print(f(H))
# Judge status: Accepted
from fractions import gcd

S = input()
odd = [0,0]
even = [0,0]
for i,s in enumerate(S):
  if i % 2 == 0:
    even[int(s)]+=1
  else:
    odd[int(s)]+=1
o0e1 = odd[1]+even[0]
o1e0 = odd[0]+even[1]
print(min(o0e1,o1e0))
# Judge status: Wrong Answer
n = int(input())
check = True
ss = ''
str_set = set()

for i in range(n):
  s = input()
  str_set.add(s)
  if ss != '':
    if ss[-1] != s[0]:
      break  
  ss = s  
    
if len(str_set)!=n:
  print('No')
elif i != n-1:
  print('No')
else:
  print('Yes')
# Judge status: Accepted
# Begin Header {{{
from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement
# }}} End Header
# _________コーディングはここから！！___________

n, m, k = map(int, input().split())
a = [0]+list(accumulate(map(int, input().split())))
b = [0]+list(accumulate(map(int, input().split())))
ans = [0]
for i in range(n+1):
    c = bisect_right(b, k-a[i])-1
    if c!=-1: ans.append(c+i)
print(max(ans))
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

print(len(list(range(a,b+1,c))))
# Judge status: Accepted
s = input()
a = int(s[0])*1000+int(s[1])*100+int(s[2])*10+int(s[3])+1
b = s[4]+s[5]+s[6]+s[7]+s[8]+s[9] 
print(str(a)+b)
# Judge status: Accepted
processedIp = input().split(" ")
k = int(processedIp[0])
x = int(processedIp[1])
totalValue = k*500
if (totalValue >= x):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from collections import Counter
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
dic = Counter(a)
q = int(input())
bs = []
cs = []
for _ in range(q):
    b, c = map(int, input().split())
    bs.append(b)
    cs.append(c)

ans = 0
for k, v in dic.items():
    ans += k * v

for i in range(q):
    b = bs[i]
    c = cs[i]
    b_num = dic.get(b, 0)
    ans = ans + (c - b) * b_num
    dic[c] = dic.get(c, 0) + dic.get(b, 0)
    dic[b] = 0
    print(ans)
# Judge status: Accepted
n, m = map(int, input().split())
a_list = [int(i) for i in input().split()]

a_sum = sum(a_list)
a_sorted = sorted(a_list)[::-1]

if a_sorted[m-1] >= a_sum/m/4:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import numpy as np
A,B = input().split()
B = float(B)

A = int(A)

B = int(B*100)
ans = str(np.dot(A,B))
if len(ans) <=2:
    print(0)
else:
    print(ans[:-2])
# Judge status: Wrong Answer
N = int(input())
re = 0
for i in range(N):
    if i % 3 == 0 or i % 5 == 0:
        re = re + 0
    else: re = re + i
print(re)
# Judge status: Accepted
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

n = int(input())
s = input()

def searchIndex(c):
    return alphabet.index(c)
  
s_rot_n = ''
for i in range(len(s)):
    index = (searchIndex(s[i]) + n) % 26
    s_rot_n += alphabet[index]
    
print(s_rot_n)
# Judge status: Wrong Answer
s = list(input())
k = int(input())
n = len(s)
c = ord("z") + 1
for i in range(n):
    tmp = c - ord(s[i])
    if k >= tmp:
        s[i] = "a"
        k -= tmp
if k > 0:
    s[n-1] = chr(ord(s[n-1])+k%26)
print("".join(s))
# Judge status: Wrong Answer
N = input()

ans = 0
for n in N:
  ans = (ans + int(n)) % 9
if ans == 0: print("YES")
else: print("NO")
# Judge status: Wrong Answer
def resolve():
    N = int(input().replace(" ", ""))
    for i in range(100):
        if N == i * i:
            print("Yes")
            break
    else:
        print("No")


resolve()
# Judge status: Wrong Answer
a, b = map(int, input().split())

ans = (b-a)*(b-a-1)/2-a

print(ans)
# Judge status: Accepted
def main():
    k = int(input())
    a, b = map(int, input().split())
    ans = "NG"
    for i in range(a, b + 1):
        if i % k == 0:
            ans = "OK"
            break
    print(ans)

if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
N = str(input())
for i in range(1,9+1):
    if N.count(str(i)*3):
        print('Yes')
    else:
        exit()
print('No')
# Judge status: Accepted
n, k = map(int, input().split())
A = list(map(int, input().split()))


for i in range(k, n):
    if A[i-k] < A[i]:
        print('Yes')
    else:
        print('No')
# Judge status: Accepted
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


def main():
    C = [list(map(int, input().split())) for _ in range(3)]

    b2_1 = C[0][1] - C[0][0]
    b3_1 = C[0][2] - C[0][0]

    if (any([b2_1 != C[x][1] - C[x][0] for x in [1, 2]]) or
            any([b3_1 != C[x][2] - C[x][0] for x in [1, 2]])):
        print("No")
    else:
        print("Yes")


if __name__ == "__main__":
    main()
# Judge status: Accepted
import math
N, M = map(int, input().split())
nums = list(map(int, input().split()))
lcm = 1
b_cnt = -1
for num in nums:
  lcm = lcm*(num//2)//math.gcd(lcm, num//2)
  count = 0
  while num%2 == 0:
    count += 1
    num //= 2
  if b_cnt < 0:
    b_cnt = count
  elif count != b_cnt:
    print(0)
    exit()
print((M+lcm)//(lcm*2))
# Judge status: Wrong Answer
from itertools import combinations_with_replacement
N,M,Q = map(int,input().split())
A = []
for i in range(Q):
    b = list(map(int,input().split()))
    A.append(b)

T = range(M+1)
K = list(combinations_with_replacement(T,N))

ans = 0
for line in K:
    total = 0
    for combi in A:
        if line[combi[1]-1] - line[combi[0]-1] == combi[2]:
            total += combi[3]
    ans = max(total,ans)

print(ans)
# Judge status: Accepted
n = int(input()) % 1000
print(1000 - n if n else 0)
# Judge status: Wrong Answer
A, B = map(int, input().split())
if A > B :
    print(2 * A - 1)
elif B < A :
    print(2 * B - 1)
else :
    print(A + B)
# Judge status: Accepted
candy_list = list(map(int, input().split(' ')))

if max(candy_list) == (sum(candy_list) - max(candy_list)):
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N = int(input())
b = [10**9] + list(map(int,input().split())) + [10**9]
a = []
a.append(b[1])
for i in range(1,N-1):
  a.append(min(b[i-1],b[i]))
  
a.append(b[N-1])
print(sum(a))
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))

fii=min(a[0],b[0])
fij=min(a[1],b[0]-fii)
icnt=fii+fij
for i in range(1,n):
    fii=min(a[i]-fij,b[i])
    fij=min(a[i+1],b[i]-fii)
    icnt+=fij+fii

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

if a>0:
    print('Positive')
elif a<0:
    if b<0 and (b-a+1)%2==0:
        print('Positive')
    elif b<0 and (b-a+1)%2==1:
        print('Negative')
    elif b>0:
        print('Zero')
# Judge status: Accepted
from itertools import permutations


def main():
    n = int(input())
    P = tuple(map(int, input().split()))
    Q = tuple(map(int, input().split()))

    for i, per in enumerate(permutations(range(1, n + 1), n)):
        if per == P:
            a = i
        if per == Q:
            b = i

    print(abs(a - b))


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
def main():
    N = int(input())
    li = [-1] + list(map(int, input().split()))
    S = 0
    for i in range(1, N):
        for j in range(i + 1, N + 1):
            S += (li[i] ^ li[j]) % (10 ** 9 + 7)
    print(S)



if __name__ == "__main__":
    main()
# Judge status: Accepted
S = input()
res = "Yes"
if S.count('N') and not S.count('S'):
    res = "No"
if not S.count('N') and S.count('S'):
    res = "No"
if S.count('E') and not S.count('W'):
    res = "No"
if not S.count('E') and S.count('W'):
    res = "No"
print(res)
# Judge status: Wrong Answer
n = int(input())
flag = True
ans = 1
now = n
count = 1

for i in range(10000):
    if n > 2**i:
        pass
    elif n == 2**i:
        print(4*(2**(i)//2)-1)
        break
    else:
        print(4*(2**(i-1)//2)-1)
        break
# Judge status: Accepted
import math
N, D = map(int, input().split())
print(math.ceil(N/(2*D+1)))
# Judge status: Accepted
N = int(input())
A = int(input())
if N%500<=A:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
n,m=map(int,input().split())
a=[input() for i in range(n)]
b=[input() for j in range(m)]

count=0

for k in range(n-m+1):
    for j in range(n-m+1):
        for i in range(m):
            if a[i+k][j:j+m]==b[i]:
                count+=1
        if count==m:
            print("Yes")
            exit()
        count=0
print("No")
# Judge status: Wrong Answer
n,m = map(int,input().split())

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

rank_hlist = sorted(hlist)
rank_dict = dict()
for i in range(n):
    rank_dict[rank_hlist[i]] = i
    
ab_list = []
for i in range(m):
    a, b = map(int,input().split())
    if rank_dict[hlist[a-1]] < rank_dict[hlist[b-1]]:
        a,b = b,a
    ab_list.append([a,b])

good_n = [1]*n

ab_list.sort(key=lambda x:x[0], reverse=True)

for i in range(m):
    ab = ab_list[i]
    good_n[ab[1]-1] = 0

print(good_n.count(1))
# Judge status: Wrong Answer
s = input()
a = ""
for i in a:
  if i == "1" or i == "0":
    a += i
  else:
    if a:
      a = a[:-1]
print(a)
# Judge status: Accepted
# coding: utf-8

def main():
    a, b = map(int, input().split())
    ans = 'Positive'

    if a <= 0 and b >= 0:
        ans = 'Zero'
    elif b < 0:
        if (b - a) % 2 == 0:
            ans = 'Negative'

    print(ans)

if __name__ == "__main__":
    main()
# Judge status: Accepted
S, T = input().split()

print(T + S)
# Judge status: Wrong Answer
cnt=0
cnt_2=0
s = str(input())
for i in range(len(s)):
    if s[i]=='0' and i%2==0:
        cnt+=1
    else:
        cnt_2+=1
    if s[i]=='1' and i%2!=0:
        cnt+=1
    else:
        cnt_2+=1
print(min(cnt,cnt_2))
# Judge status: Accepted
n = int(input())
print(sum([i for i in range(1,n+1)]))
# Judge status: Wrong Answer
from functools import reduce

n, m = map(int, input().split())
mod = 10 ** 9 + 7

if abs(n - m) >= 2:
    print(0)
elif n - m == 1:
    a = reduce(lambda x, y: (x * y) % mod, range(1, n + 1))
    b = reduce(lambda x, y: (x * y) % mod, range(1, m + 1))
    ans = (a * b) % mod
    print(ans)
elif n == m:
    a = reduce(lambda x, y: (x * y) % mod, range(1, n + 1))
    b = reduce(lambda x, y: (x * y) % mod, range(1, m + 1))
    ans = (a * b * 2) % mod
    print(ans)
# Judge status: Accepted
n, a, b = map(int, input().split())
q = n // (a + b)
r = n % (a + b)

print(q*a + min(r, a))
# Judge status: Accepted
import numpy as np
n,m = map(int, input().split())
A = np.array([list(map(int, input().split())) for _ in range(n)], dtype='int64')
ind = np.argsort(A[:,0])
A = A[ind]
num = 0
money = 0
for a,b in A:
    num += b
    if num < m:
        money += a * b
    else:
        money += a * (b - (num - m))
        break
print(money)
# Judge status: Accepted
s = input()
if s[0] == 'A' and s.count('A') == 1 and s.count('C') == 1 and s[2:-1].count('C') == 1:
    s = s.replace('A', '').replace('C', '')
    for c in s:
        if ord(c) < ord('a'):
            print('WA')
            exit(0)
    print('AC')
else:
    print('WA')
# Judge status: Wrong Answer
a, b = (int(x) for x in input().split())
c = a * b
if c > 1 and c < 400:
    print(c)
else:
    print("-1")
# Judge status: Accepted
n=input()
print(chr(ord(n)+1))
# Judge status: Accepted
n=int(input())

sum=0

for i in range(1,n+1):
    sum=sum+i

print(sum)
# Judge status: Wrong Answer
a,b,c,x,y = map(int,input().split())

ans = 0

if a + b >= c * 2:
    ans = c * 2 * min(x,y)
    if min(a,b) >= c * 2:
        ans += (max(x,y) - min(x,y)) * (c * 2)
    else:
        if x >= y:
            ans += min((max(x,y) - min(x,y)) * a,(max(x,y) - min(x,y)) * b) 
else:
    ans = a * x + b * y

print(ans)
# Judge status: Accepted
n = int(input())
k = int(input())
x = int(input())
y = int(input())

print(min(k, n)*x + max((n-k)*y, 0))
# Judge status: Accepted
print(2**len(bin(int(input())))//4-1)
# Judge status: Accepted
n,m=map(int,input().split())
print(((n-1)*n)//2+((m-1)*m)//2)
# Judge status: Accepted
N = int(input())
v = list(map(int,input().split()))
v.sort()
L = []
for i in range(N-1):
  a = (v[i]+v[i+1])/2
  L.append(a)
  v[i+1] = a
print(max(L))
# Judge status: Accepted
k=int(input())
s=[i for i in input()]

ans=0

if len(s)<=k:
  ans="".join(s)
else:
  ans="".join(s[:k])+"..."
  
print(ans)
# Judge status: Wrong Answer
import math

S = int(input())

m = (10**9)+7
def combinations_count(n, r):
    return (math.factorial(n) // (math.factorial((n - r)) * math.factorial((r))))

result = 0

for i in range((S-1)//9+1,S//3+1):
    result += combinations_count((S-i*3+(i-1)), (i-1))

print(result%m)
# Judge status: Accepted
x = int(input())
 
s = x//11
 
if 11*s == x:
  print(s*2)
elif x <= 11*s + 6:
  print(s*2+1)
else:
  print(s*2+2)
# Judge status: Wrong Answer
x = int(input())
flag = 0
for i in range((x//7)+1):
    x = x - 7
    if x < 0:
        break
    if x%4 == 0:
        flag = 1

if flag == 1:
    print("Yes")
else :
    print("No")
# Judge status: Wrong Answer
h,n=map(int,input().split())
H=[]
A=[]
for i in range(n):
    a,b=map(int,input().split())
    H.append([a,b])
    A.append(a)
a_max=max(A)
dp=[10**5]*(h+a_max+1)
dp[0]=0
for i in range(1,h+a_max+1):
    for j in range(n):
        if i-H[j][0]<0:
            dp[i]=min(dp[i],H[j][1])
        else:
            dp[i]=min(dp[i],dp[i-H[j][0]]+H[j][1])
print(min(dp[h:h+a_max+1]))
# Judge status: Accepted
a, b, c, d = map(int, input().split())

if (abs(b-a) <= d and abs(c-b) <= d) or abs(c-a) <= d:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n = int(input())
dd = {}
for i in range(n):
	s = input()
	if s in dd.keys():
		dd[s] += 1
	else:
		dd[s] = 1
ma = max(dd.values())
lst = []
for k, v in dd.items():
	if v == ma:
		lst.append(k)
for l in sorted(lst):
	print(l)
# Judge status: Wrong Answer
a, b = map(int, input().split())

n = abs(a-b)
print(n if n&1 else "IMPOSSIBLE")
# Judge status: Accepted
import bisect
n = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        k = L[i]+L[j]
        x = bisect.bisect_left(L,k)
        ans += x-j-1
print(ans)
# Judge status: Accepted
from math import sqrt
n = int(input())
ans = 0
for i in range(2, 1 + int(sqrt(n))):
    c = 0
    while n % i == 0:
        n //= i
        c += 1
    ans += int((-1 + sqrt(1 + 8 * c)) / 2)
if n != 1:
    ans += 1
print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
D = list(map(str,input().split()))
for i in range(n,10**7):
    for j in str(i):
        if j in D:
            break
    else:
        print(i)
        break
# Judge status: Accepted
A,B,C = map(int,input().split())
print(min(B//A,C))
# Judge status: Accepted
n,m = input().split()
N = int(n)
L1 = list(map(int,input().split()))
ans=-1
if sum(L1)<=N:
    ans = N-sum(L1)
print(ans)
# Judge status: Accepted
n,a,b = map(int,input().split())
mod = 10**9+7
sum_comb = pow(2,n,mod) - 1


def comb(n, r, mod):
    x=y=1
    for i in range(r):
        x *= n; y *= r
        x %= mod; y %= mod
        n -= 1; r -= 1
    return x * pow(y, mod - 2, mod) % mod

comb_a = comb(n,a,mod)
comb_b = comb(n,b,mod)

print((sum_comb - comb_a - comb_b)%mod)
# Judge status: Accepted
alphabet = "abcdefghijklmnopqrstuvwxyz"

S = input()

result = ""
found = True

for i in alphabet:
    if i not in S:
        result = i
        found = False
        break

if not found:
    print(result)
else:
    print("None")
# Judge status: Accepted
import sys
sys.setrecursionlimit(2147483647)

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

if n==2:
    print(aa[0],aa[1])
    exit()

aa.sort()

nn=max(aa)

c=0
tmp=10**9

for a in aa:
    if abs(nn/2.0-a)<tmp:
        tmp=abs(nn/2.0-a)
        c=a

print(nn,c)
# Judge status: Accepted
N = int(input())
w = [input() for _ in range(N)]

jdg = True

s_last = w[0][-1]
ss = [w[0]]

for s in w[1:]:
    if s in ss:
        jdg = False
        break
    if s[0] != s_last:
        jdg = False
        break
    s_last = s[-1]
    ss.append(s)
print('Yes' if jdg else 'No')
# Judge status: Accepted
S=int(input())
if S<10**18:
    x1,y1,x2,y2,x3,y3=0,0,(S//10**9+1),10**9-S%10**9,1,10**9
else:
    x1,y1,x2,y2,x3,y3=(0,0,10**9,1,0,10**9)
print(x1,y1,x2,y2,x3,y3)
# Judge status: Accepted
N = int(input())
L = list(map(int, input().split()))

maxlength = max(L)
total = sum(L)
if total > maxlength * 2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
import math
N = int(input())
 
print((math.ceil(N/2))/N)
# Judge status: Accepted
import math

n,k = map(int,input().split())
a = list(map(int,input().split()))
print(math.ceil((n-1)/(k-1)))
# Judge status: Accepted
a, b, c = map(int, input().split())
K = int(input())
k = 0
while a >= b:
    b *= 2
    k += 1
while b >= c:
    c *= 2
    k += 1
if k<=K:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
n,a,b,c,d = map(int,input().split())
s = input()
if '##' in s[a:c] or '##' in s[b:d]:
  print('No')
else:
  if c < d:
    print('Yes')
  else:
    if '...' in s[b - 2:d + 1]:
      print('Yes')
    else:
      print('No')
# Judge status: Wrong Answer
import math
def main():
    N=int(input())
    A=int(input())
    B=int(input())
    C=int(input())
    D=int(input())
    E=int(input())
    min_num=N+1
    for i in (A,B,C,D,E):
        min_num=min(i,min_num)
    print(math.ceil(N/min_num)+1+4)
    
if __name__=="__main__":
    main()
# Judge status: Wrong Answer
n = int(input())
a = list(map(int,input().split()))

max_n = max(a)

tmp = max_n//2
check = 10**9+7

for i in range(n):
    res = a[i] - tmp
    if check > tmp:
        check = tmp
        ans_r = a[i]
        
print(max_n,ans_r)
# Judge status: Accepted
a,v=[int(x) for x in input().rstrip().split()]
b,w=[int(x) for x in input().rstrip().split()]
t=int(input())


if b+w*t<=a+v*t and a-v*t<=b-w*t:
  print("YES")
else:
  print("NO")
# Judge status: Wrong Answer
import itertools

N = list(range(1, int(input()) + 1))
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))

a = 0
b = 0
for i, n in enumerate(itertools.permutations(N)):
    if n == P:
        a = i
    elif n == Q:
        b = i
print(abs(a - b))
# Judge status: Accepted
import sys

input = sys.stdin.readline


n = int(input())

s = list(input())

c = 0
for e in s:
    if e == 'R':
        c += 1

res = min(c,n-c)

tmp = 0
for i in range(c):
    if s[i] != 'R':
        tmp += 1

res = min(res,tmp)

print(res)
# Judge status: Accepted
N = int(input())
T, A = map(int, input().split())
H = list(map(int, input().split()))

for i in range(N):
    H[i] = T - H[i]*0.006

t = 10**5
p = 0
for i in range(N):
    if abs(H[i]-A) < t:
        t = abs(H[i]-A)
        p = i+1
print(p)
# Judge status: Wrong Answer
S = input()
f, r = int(S[:2]), int(S[2:])
#print(f)
#print(r)
if f == 0 or r == 0 or (f > 12 and r > 12):
  ans = "NA"
elif f > 12 and r <= 12:
  ans = "YYMM"
elif f <= 12 and r > 12:
  ans = "MMYY"
elif r <= 12 and f <= 12:
  ans = "AMBIGUOUS"
print(ans)
# Judge status: Wrong Answer
s = input()
if s[0] == s[1] and s[2] == s[3]:
	print('Yes')
elif s[0] == s[2] and s[1] == s[3]:
	print('Yes')
elif s[0] == s[3] and s[1] == s[2]:
  	print('Yes')
else:
	print('No')
# Judge status: Wrong Answer

N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N
ans = 0

for k in range(N):
    ans = ans + (list[k] - A) ** 2

for i in range(-100,100):
    sum = 0
    sum_new = 0
    for j in range(N):
        sum_new = sum_new + (list[j] - i) ** 2
    if(sum > sum_new):
        ans = sum_new

print(ans)
# Judge status: Wrong Answer
import math
import sys
n = int(sys.stdin.readline())
ans = 0
for i in range(3, n + 1, 2):
    # print(f'{i=}', end=' ')
    count = 0
    for j in range(1, int(math.sqrt(i))):
        if i % j == 0:
            # print(f'{i} % {j} is 0.')
            count += 2
    if count == 8:
        # print(f'{i} have just 8 divisors.')
        ans += 1
print(ans)
# Judge status: Accepted
S = input()
if(S[2]==S[3] and S[4]==S[5]):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
# 2020/07/23
# AtCoder Beginner Contest 126 - C
import math

# Input
n, k = map(int,input().split())

ans = 0

# Calc
for i in range(1, n+1):
    idx = 1
    wval = i
    while(wval < k):
        wval = wval * 2
        idx = idx + 1
    
    ans = ans + (1/n) * (1/2) ** idx

# Output
print(ans*2)
# Judge status: Accepted
a,b,c = map(int,input().split())
if b-a == c-b:
    print('YES')
else:
    print('NO')
# Judge status: Accepted
a, b = map(int, input().split())

print(-(-a//b))
# Judge status: Accepted
# Python3 (3.4.3)
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A = int(input())
S = input().rstrip()
 
print(S if A>=3200 else "red")