peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
a,b = list(map(int, input().split()))

ans = min(a,b)

for i in range(ans):
  print(str(ans),end="")
# Judge status: Wrong Answer
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
    n = ni()

    x = round(n / 1.08)
    y = x+1
    z = x -1
    # print(x * 1.08, y*1.08, z*1.08)
    # print(x, y, z)
    if x == n:
        print(x)
    elif y == n:
        print(y)
    elif z == n:
        print(z)
    else:
        print(":(")

if __name__ == '__main__':
  main()
# Judge status: Wrong Answer
from sys import stdin
input = stdin.readline

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

ab.sort()

ran = []

for a, b in ab:
    ran.append(b - a + 1)

ran.sort()

if N % 2 == 0:
    a1, b1 = ab[N // 2 - 1]
    a2, b2 = ab[N // 2]
    xa = (a2 + a1) / 2
    xb = (b2 + b1) / 2
    print(xa, xb)
    print(int((xb - xa) * 2 + 1))
else:
    xa, xb = ab[N // 2]
    print(xb - xa + 1)
# Judge status: Accepted
N = int(input())
S = [input() for _ in range(N)]
S_set = set(S)
M = int(input())
T = [input() for _ in range(M)]
m = 0
for s in S_set:
  m = max(m, S.count(s)-T.count(s))
print(m)
# Judge status: Wrong Answer
count=0
n=int(input())
for a in range(1,n):
    for b in range(1,n):
        aa=str(a)
        bb=str(b)
        fa=int(aa[0])
        fb=int(bb[0])
        la=a%10
        lb=b%10
        if fa==lb and fb==la:
            count+=1
print(count)
# Judge status: Accepted
import math

x = int(input())


def is_prime(n):
    if n < 2:
        return False
    if n % 2 == 0 and n > 2:
        return False
    return all(n % i for i in range(3, int(math.sqrt(n)) + 1, 2))


for n in range(100005):
    if n >= x and is_prime(n):
        print(n)
        break
# Judge status: Wrong Answer
s = list(input())
t = list(input())
s.sort()
t.sort()
if s == t:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
x, y = map(int, input().split())
if x * y % 2 == 0:
    print("Even")
else:
    print("Odd")
# Judge status: Wrong Answer
N=int(input())
ABC=[]
for i in range(N):
	ABC+=[[int(i) for i in input().split()]]
DP=[[0,0,0] for i in range(N)]
for i in range(N):
	for j in range(3):
		DP[i][j]=ABC[i][j]+max(DP[i-1][(j+1)%3],DP[i-1][(j+2)%3])
print(max(DP[N-1]))
# Judge status: Accepted
sx, sy, gx, gy = map(int, input().split(' '))

route = []
dy = gy - sy
dx = gx - sx
route.append('U' * dy)
route.append('R' * dx)
route.append('D' * dy)
route.append('L' * (dx + 1))
route.append('U' * (dy + 1))
route.append('R' * (dx + 1))
route.append('DR')
route.append('D' * (dy + 1))
route.append('L' * (dx + 1))
route.append('U')
print(''.join(route))
# Judge status: Accepted
#79 C - Reconciled?
N,M = map(int,input().split())
MOD = 10**9 + 7

if abs(N-M) >= 2:
    ans = 0
else:
    # M! * N!
    Mfact = 1
    for m in range(1,M+1):
        Mfact = (Mfact * m)%MOD
    Nfact = 1
    for n in range(1,N+1):
        Nfact = (Nfact * n)%MOD
    ans = (Nfact*Mfact)%MOD
    if abs(N-M) == 0:
        ans = (ans * 2)%MOD
print(ans)
# Judge status: Wrong Answer
a,b=input().split()
c = int(a+b)
for i in range(1, 110):
  if c == i*i:
    print('Yes')
    exit()
print('No')
# Judge status: Wrong Answer
import sys
input = sys.stdin.readline
n,k,s=map(int,input().split())
if k==0:
    if s<10**9:
        a=s+1
    else:
        a=s-1
    ans=[]
    for i in range(n):
        ans.append(a)
    print(*ans)
    exit()
ans=[]
for i in range(n-k):
    ans.append(1 if s!=1 else 2)
for j in range(k):
    ans.append(s)
print(*ans)
# Judge status: Accepted
a, b = map(int, input().split())
if a+b >= 24:
    print(a+b-24)
else:
    print(a+b)
# Judge status: Accepted
W,a,b=list(map(int,input().split()))
ans=0
if a<b:
    ans=max(0, b-(a+W))
if a>=b:
    ans=max(0, a-(b+W))
print(ans)
# Judge status: Accepted
N, M = map(int,input().split())
KA = [list(map(int,input().split())) for i in range(N)]

dic = {}

for i in range(N):
  for j in range(len(KA[i])-1):
    if KA[i][1+j] not in dic.keys():
      dic[KA[i][1+j]] = 1
    else:
      dic[KA[i][1+j]] += 1
      
ans = 0

for i in dic:
  if dic[i] == N:
    ans += 1
    
print(ans)
# Judge status: Wrong Answer
s=sorted(input())
if s[0]==s[1]:
  if s[0]!=s[2] and s[2]==s[3]:
    print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
N = int(input())
list = [input()]
for i in range(N-1):
    s = input()
    for j in list:
        if s == j:
            break
        list.append(s)
print(len(list))
# Judge status: Accepted
X = int(input())
sm=0
for k in range(X+1):
    sm +=k
    if sm>=X:
        print(k)
        break
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 16 12:35:58 2020

@author: liang
"""

N, M = map(int, input().split())
A = [int(x) for x in input().split()]
A.sort(reverse=True)
#print(A)
count = 0
while count != M:
    A[0] //= 2
    count += 1
    tmp = A[0]
    for i in range(1,N):
        if count == M:
            break
        if A[i] > tmp:
            A[i] //= 2
            count += 1
        ##   break
ans = sum(A)
#print(A)
print(ans)
# Judge status: Wrong Answer
a,b,c = map(int,input().split())
if a+b+c == 22:
		print("bust")
		
else:
		print("win")
# Judge status: Wrong Answer
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


n = int(readline())
csf = [tuple(map(int, readline().split())) for _ in range(n-1)]

for i in range(n):
    now = 0
    for c, s, f in csf[i::]:
        if now <= s:
            now += s - now + c
        else:
            now += (now-s) % f + c
    print(now)
# Judge status: Accepted
n, x, y = map(int, input().split())
x = min(x - 1, y - 1)
y = max(x - 1, y - 1)
length = [0] * (n - 1)
for i in range(n - 1):
    for j in range(i, n):
        l = min(abs(i - j), abs(i - x) + 1 + abs(j - y), abs(i - y) + 1 + abs(j - x))
        if l != 0:
            length[l - 1] += 1
for l in length:
    print(l)
# Judge status: Wrong Answer
n, x, t = map(int, input().split())

print((n//x + 1) * t)
# Judge status: Accepted
s, t = input(), input()
s = ''.join(sorted(s))
t = ''.join(sorted(t, reverse=True))
if s < t:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
#!/usr/bin/env python
# coding: utf-8

# In[1]:


N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))


# In[6]:


idx_max = A.index(max(A))
tmp = [x for x in A]
del tmp[idx_max]
most_max = max(A)
second_max = max(tmp)
for i in range(N):
    if i == idx_max:
        print(second_max)
    else:
        print(most_max)


# In[ ]:
# Judge status: Accepted
a,b,c=map(int,input().split())
if a<=c<=b or a>c>b:
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
n = int(input())
p = list(map(int, input().split()))

ans = 0
for i in range(1, n-1):
  if p[i-1]<p[i]<p[i+1]:
    ans += 1
print(ans)
# Judge status: Accepted
a,b=map(int,input().split())
print(int((b-a)*(b-a+1)/2-b))
# Judge status: Accepted
x,y = map(int, input().split())
print(-1 if x % y == 0 else x*y - x)
# Judge status: Accepted
def main():
    n, l = map(int, input().split())
    a_score = list()
    
    for i in range(n):
        # りんごiはl+i-1。indexがずれるので-1しない
        a_score.append(l+i)
    a_sum = sum(a_score)
    if 0 in a_score:
        print(a_sum - 0)
    elif min(a_score) < 0:
        print(a_sum - max(a_score))
    else:
        print(a_sum - min(a_score))
        
if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
if len(input())==2:
  print("Yes")
else:
  print("No")
# Judge status: Accepted
alp = 'abcdefghijklmnopqrstuvwxyz'

def f(s):
  new_s = ''
  i = 0
  is_used = [-1]*26
  for si in s:
    idx = ord(si) - 97
    if is_used[idx] < 0:
      is_used[idx] = i
      new_s += alp[i]
      i += 1
    else:
      new_s += alp[is_used[idx]]
  return new_s


S = f(input())
T = f(input())
if S == T:
  print('Yes')
else:
  print('No')
# Judge status: Wrong Answer
# -*- coding: <encoding name> -*-

x = int(input())
print(1000 * (x // 500) + (x % 500))
# Judge status: Accepted
import sys
input = sys.stdin.readline

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

def gcd(x,y):
  while y:
    x, y = y, x%y
  return x

ll, lr = [0]*n, [0]*n
ll[0], lr[n-1] = a[0], a[n-1]
for i in range(1,n):
  ll[i] = gcd(ll[i-1], a[i])
  lr[n-i-1] = gcd(lr[n-i], a[n-i-1])

print(max(ll[n-2], lr[1], *[gcd(l,r) for l,r in zip(ll[:n-2], lr[2:])]))
# Judge status: Accepted
from itertools import accumulate
n=int(input())
A=[int(i) for i in input().split()]

B=list(accumulate(A))

s = 0 
for i in range(n):
    s += A[i]*(B[-1]-B[i])
    s %= (10**9+7)
print(s)
# Judge status: Wrong Answer
import numpy as np

n = int(input())
s = input()
s_W = [0]
s_E = [0]

for i in range(n):
    if s[i] == "W":
        s_W.append(1)
        s_E.append(0)
    else:
        s_W.append(0)
        s_E.append(1)

W_l = np.cumsum(np.array(s_W))
E_l = np.cumsum(np.array(s_E))

ans = []
for j in range(n):
    num = W_l[j]+E_l[-1]-E_l[j]
    ans.append(num)
print(min(ans))
# Judge status: Wrong Answer
s=list(input())
from copy import copy
t=s.copy()

for i in range(len(t)):
  if len(s)%2==0 and s[:len(s)%2]==s[len(s)%2:]:
    print(len(s))
    exit()
  else:
    s.pop(-1)
# Judge status: Accepted
lis = list(map(int,input().split()))
if max(lis) == sum(lis)-max(lis):
  print("Yes")
else:
  print("No")
# Judge status: Wrong Answer
N,A,B,C,D = map(int,input().split())
S=input()
ans="Yes"

if D<C:
  triple = S[B-1:D].count("...")
  if triple ==0:
    ans="No"

double= S[A-1:].count("##")
if double > 0:
  ans="No"
  
print(ans)
# Judge status: Wrong Answer
C = input()

alpha = ["a","b","c","d""e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

j = 0
for i in alpha:
    if i == C:
        print(alpha[j+1])
    j += 1
# Judge status: Wrong Answer
n=int(input())
a=list(map(int,input().split(' ')))
x=0
y=0
a.sort()
a.reverse()
for i in range(len(a)-1):
    if a[i]==a[i+1]:
        x=a[i]
        break
if x!=0:
    for i in range(len(a)-1):
        if a[i]!=x and a[i]==a[i+1]:
            y=a[i]
            break
print(x*y)
# Judge status: Wrong Answer
n = int(input())
if 189 <= n:
    print(4)
elif 165 <= n:
    print(3)
elif 135 <= n:
    print(2)
elif 105 <= n:
    print(1)
else:
    print(0)
# Judge status: Accepted
a, b, x = map(int, input().split())

if a%x==0:
    ax = a//x-1
else:
    ax = a//x

bx = b//x

print(bx-ax)
# Judge status: Wrong Answer
n, m = map(int, input().split())
a = list(map(int, input().split()))
study_sum = sum(a)
print(n-study_sum)
# Judge status: Wrong Answer
n = int(input())

a = 0
b = 0
c = 0
d = 0

for i in range(n):
    s = input()
    if s == 'AC':
        a += 1
    elif s == 'WA':
        b += 1
    elif s == 'TLE':
        c += 1
    else:
        d += 1
        
print('AC ×', a)
print('WA ×', b)
print('TLE ×', c)
print('RE ×', d)
# Judge status: Accepted
S = input()
N = len(S)
for i in range(N-1, -1, -2):
    if S[:i//2] == S[i//2:i-1]:
        print(i-1)
        exit(0)
# Judge status: Wrong Answer
a, b, c = map(int, input().split())

if a%2 == b%2 == c%2 == 0:
    print(0)
else:
    print(min(a*b, b*c, b*c))
# Judge status: Accepted
w, a, b = map(int, input().split())
print(max(0, b - a - w, a - b - w))
# Judge status: Wrong Answer
s=input()
if set(s)=='abc':
  print('Yes')
else:
  print('No')
# Judge status: Accepted
n,k=map(int,input().split())
A=list(map(int,input().split()))
A=sorted(A)
if(k>=n):
  print(0)
else:
  print(sum(A[:n-k]))
# Judge status: Wrong Answer
S=input()
A="S[0]"+"S[1]"+"S[2]"
print(A)
# Judge status: Accepted
s=int(input())
if  s<3:print(0);exit()
n=s//3
mod=10**9+7
fact=[1]*(2*s+1)
inv=[1]*(2*s+1)
for i in range(2,2*s+1):
    fact[i]=i*fact[i-1]%mod
inv[-1]=pow(fact[-1],-1,mod)
for i in range(2*s,1,-1):
    inv[i-1]=inv[i]*i%mod
def comb(x,y):return fact[x]*inv[y]%mod*inv[x-y]%mod if x>=y>=0 else 0
ans=0
for i in range(1,s+1):
    ans=(ans+comb(s-3*i+i-1,i-1))%mod
print(ans)
# Judge status: Accepted
def main():
    S=input()
    P=2019
    ans=0
    
    count=[0]*P
    count[0]=1
    u=0
    
    for i,s in enumerate(reversed(S)):
        u=(int(s)*pow(10,i,P)+u)%P
        ans+=count[u]
        count[u]+=1
    print(ans)
    

if __name__=="__main__":
    main()
# Judge status: Accepted
a,b,c,d=map(int,input().split())
left=max(a,c)
right=min(b,d)
ans = right-left
if ans < 0:
    print(0)
else:
    print(ans)
# Judge status: Accepted
S = input()
T = input()

ls = len(S)
lt = len(T)
ans = 1<<60
for i in range(ls-lt+1):
    cnt = 0
    X = S[i:i+lt]
    for x, t in zip(X, T):
        if x != t:
            cnt += 1
    ans = min(ans, cnt)
print(ans)
# Judge status: Wrong Answer
in1 = input()
ind = int(in1)

alpha = "abcdefghijklmnopqrstuvwxyz"

twosix = []

while True:
  if (ind < 26):
    twosix.append(ind)
    break
  twosix.append(ind % 26)
  ind //= 26
  
#print(twosix)
ans = ""
twosix.reverse()
#print(twosix)
for i in twosix:
  ans += alpha[i-1]

print(ans)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
ans = 1000000
a = sorted(a)
for i in range(a[0],a[n-1]+1):
    counter = 0
    for j in range(n):
        dif = abs(a[j] - i)
        dif *= dif
        counter += dif
    ans = min(ans,counter)
print(ans)
# Judge status: Accepted
n = int(input())
A = [int(input()) for i in range(n)]
T = {}
k = 1
cnt = 0
while True:
    if k == 2:
        print(cnt)
        exit()
    if k not in T: T[k]=1
    else:
        print(-1)
        exit()
    k = A[k-1]
    cnt+=1
# Judge status: Accepted
import math

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

b = [a[i] % 2 for i in range(n)]

z = b.count(0)
o = b.count(1)

c = 0

for i in range(o+1):
  if i % 2 == 0:
    c += math.factorial(o)/(math.factorial(i)*math.factorial(o-i))

ans = int(c *( 2 **z))
    
if p == 0:
  print(ans)
else:
  print(str(2**n-ans))
# Judge status: Accepted
a,b = map(int, input().split())

#from math import gcd
from fractions import gcd

g = gcd(a,b)

pf = {}

for i in range(2,int(g**0.5)+1):
    while g % i == 0:
        pf[i] = pf.get(i,0) + 1
        g //= i
if g > 1: pf[g] = 1

ans = 1 + len(pf.keys()) # 1は素数ではないが答えには入る

print(ans)
# Judge status: Accepted
N = int(input())

count = sum(list(map(int, str(N))))

if count % 9 == 0:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
def main():
    n = int(input())
    a = tuple(map(int, input().split()))
    ar = a[0]
    for i1 in range(1, n):
        ar ^=  a[i1]
    res = []
    for i1 in range(n):
        rt = ar ^ a[i1]
        res.append(rt)
    print(*res)

if __name__ == '__main__':
    main()
# Judge status: Accepted
x = int(input())
#6と5を繰り返す
if x%11==0: print(x//11*2)
elif x%11 <= 6: print(x//11*2+1)
else: print(x//11*2+2)
# Judge status: Wrong Answer
a=input()
b=['Sunny','Cloudy','Rainy']
for i in range(3):
  if i==2:
    print('Sunny')
    break
  if b[i]==a:
    print(b[i+1])
# Judge status: Accepted
import sys
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))

def main():
    a, b, x = MII()
    if x < a: print('NO')
    elif x <= a+b: print('YES')
    else: print('NO')

if __name__ == '__main__':
    main()
# Judge status: Accepted
X,K,D = [int(x) for x in input().split()]

if D * K < abs(X):
    print(abs(X) - D * K)
else:
    if (K - abs(X) // D) % 2 == 0:
        print(abs(X) % D)
    else:
        print(D - abs(X) % D)
# Judge status: Wrong Answer
n,k = map(int,input().split())



while True:
    if n < k:
        print(n)
        break
    n = n % k
    if n == 0:
        print(0)
        break

    ans = n - k
    next_ans = abs(ans) - k
    if abs(next_ans) > abs(ans):
        print(abs(ans))
        break
    else:
        print(abs(next_ans))
        break
# Judge status: Accepted
import sys

*S, = input()

op = ['-', '+']
for i in op:
    for j in op:
        for k in op:
            e = f'{S[0]}{i}{S[1]}{j}{S[2]}{k}{S[3]}'
            if eval(e) == 7:
                print(f'{e}=7')
                sys.exit()
# 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
k, x = map(int, input().split())
print("Yes" if x <= 500*k else "No")
# Judge status: Wrong Answer
S=map(str,input())
if "A" in S:
    print("yes")
else :
    print("no")
# Judge status: Wrong Answer
import bisect
n=input()
a=sorted(list(map(int,input().split())))
b=sorted(list(map(int,input().split())))
c=sorted(list(map(int,input().split())))
ans=0
for B in b:
  ans+=(bisect.bisect_left(a,B))*(len(c)-(bisect.bisect_left(c,B)))
print(ans)
# Judge status: Wrong Answer
import math

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

def lec(a, b):
    # aとbの最小公倍数
    return a * b // math.gcd(a, b)

CD = lec(C, D)
C_num = math.floor(B / C) - math.ceil(A / C) + 1
D_num = math.floor(B / D) - math.ceil(A / D) + 1
CD_num = math.floor(B / CD) - math.ceil(A / CD) + 1

answer = B - A + 1 - C_num - D_num + CD_num

print(answer)
# Judge status: Accepted
n=int(input())
l=list(map(int,input().split()))

if max(l)<sum(l)-max(l):
  print('Yes')
else:
  print('No')
# Judge status: Accepted
a, b = map(int, input().split())

if a > 0 and b > 0:
    print("Positive")
elif a < 0 and b < 0:
    if (b-a+1)%2 == 0:
        print("Positive")
    else:
        print("Negative")
else:
    print("Zero")
# Judge status: Accepted
import heapq

n, m = map(int, input().split())
a = list(map(lambda x: -1*int(x), input().split()))

heapq.heapify(a)
for _ in range(m):
    heapq.heappush(a, -(-heapq.heappop(a)//2))
print(-sum(a))
# Judge status: Wrong Answer
A,B=map(int,input().split())
K=(A+B)/2
Kint=(A+B)//2
if (K==Kint):
  print (K)
else:
  print ('IMPOSSIBLE')
# Judge status: Wrong Answer
import sys
readline = sys.stdin.readline
s, t = readline().split()
a, b = list(map(int, readline().split()))
if s == readline():
  print(a-1,b)
else:
  print(a,b-1)
# Judge status: Accepted
x = int(input())

ans = int(x/11)*2
tmp = x%11
if tmp > 6:
    ans+=2
elif tmp > 0:
    ans+=1
print(ans)
# Judge status: Accepted
a, b = input().split();
a = int(a);
b = int(b);

for x in range(1,1001):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
    ans = x;
    break;
  elif x == 100:
    ans = -1;
  else:
    pass;
  
print(ans);
# Judge status: Wrong Answer
x,y=map(int,input().split())

a=[1,3,5,7,8,10,12]
b=[4,6,9,11]
c=[2]

for i in a:
  if x==i:
    x='a'
  if y==i:
    y='a'

for i in b:
  if x==i:
    x='b'
  if y==i:
    y='b'

for i in c:
  if x==i:
    x='c'
  if y==i:
    y='c'

if x==y:
  print('yes')
else:
  print('No')
# Judge status: Accepted
from collections import deque

def calc(seq):
  score = 0
  for a, b, c, d in req:
    if seq[b - 1] - seq[a - 1] == c:
      score += d
  return score

n, m, q = map(int, input().split())
req = [list(map(int, input().split())) for _ in range(q)]

ans = 0
que = deque()
for i in range(1, m + 1):
  que.append([i])
  
while que:
  seq = que.popleft()
  
  if len(seq) == n:
    score = calc(seq)
    ans = max(ans, score)
  else:
    for i in range(seq[-1], m + 1):
      seq_next = seq + [i]
      que.append(seq_next)
      
print(ans)
# Judge status: Accepted
import itertools
N = int(input())
S = [3,5,7,11,13]

if N >= 189:
  ans = 2
elif N>= 135:
  ans = 1
else:
  ans = 0
A = list(itertools.combinations(S,3))
#print(A)
for x in A:
  a,b,c = x
  if a*b*c <= N:
    ans += 1
print(ans)
# Judge status: Accepted
W, H, N = map(int, input().split())
minX = 0
maxX = W
minY = 0
maxY = H
for i in range(N):
    x, y, a = map(int, input().split())
    if a == 1:
        minX = max(minX, x)
    elif a == 2:
        maxX =min(maxX, x)
    elif a == 3:
        minY = max(minY, y)
    elif a == 4:
        maxY = min(maxY, y)

print(max(0, maxX-minX)*max(0, maxY-minY))
# Judge status: Accepted
a,b = map(int,input().split())
ans = 0
if b == 1:
    print(0)
    exit(0)
while b > 0:
    b-=a
    ans+=1
    if b<=0:break
    b+=1
print(ans)
# Judge status: Accepted
from collections import Counter
N = input()
A = list(map(int, input().split()))
C = Counter(A)
M = [0, 0]
for k, v in C.items():
    if v < 2: continue
    M.append(k)
    if v >= 4:
        M.append(k)
    M.sort(reverse=True)
    M = M[:2]
print(M[0]*M[1])
# Judge status: Wrong Answer
import itertools

abcd = []
N,M,Q = map(int,input().split())
for i in range(Q):
    a,b,c,d = map(int,input().split())
    abcd.append([a,b,c,d])
  
A = (list(itertools.product(list(range(1,M+1)),repeat=N)))

ans = 0
for i in A: 
    _sum = 0
    for j in abcd: 
        if i[j[1]-1] - i[j[0]-1] == j[2]:
            _sum += j[3]
    if ans < _sum:
        ans = _sum
    
print(ans)
# Judge status: Accepted
import numpy as np
import sys

input = sys.stdin.readline

S = input()

S = sorted(list(set(S[:-1])))


alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']


j = 0
for i in range(len(alpha)):
    if  S[j]== alpha[i] :
        if len(S)-1 != j:j+=1
    else:
        print(alpha[i])
        exit()


print("None")
# Judge status: Accepted
A, B, K = map(int, input().split())
if K > A + B:
  print(0, 0)
elif K <= A:
  print(A - K, B)
elif K - A <= B:
  print(0, B - (K - A))
# Judge status: Accepted
S = input()

flg = False
for i in range(len(S)):
    for j in range(len(S)-i):
        if S[:j]+S[j+i:] == 'keyence':
            flg = True
            break
    if flg: break

if flg: print('YES')
else: print('NO')
# Judge status: Accepted
# D
N, W = map(int, input().split())
 
import numpy as np
dp = np.zeros(W+1, dtype="int64")
 
for i in range(1, N+1):
    w, v = map(int, input().split())
    dp[w:] = np.maximum(dp[w:], dp[0:W-w+1] + v)
 
print(dp[-1])
# Judge status: Accepted
a,b=input().split()
n=int(a+b)
flag=False
i=1
while i**2<=n:
  if i**2==n:
    flag=True
    break
  i+=1
print("Yes" if flag else "No")
# Judge status: Wrong Answer
k,x=map(int,input().split())
if k*500>=x:
    print('yes')
else:
    print('no')
# Judge status: Accepted
N = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(N):
    result = input()
    if result == 'AC':
        ac += 1
    elif result == 'WA':
        wa += 1
    elif result == 'TLE':
        tle += 1
    else:
        re += 1
print('AC x %d\nWA x %d\nTLE x %d\nRE x %d' % (ac, wa, tle, re))
# Judge status: Accepted
n=int(input())
A=list(map(int,input().split()))

ans,cnt,mini=[],0,float('inf')
for a in A:
  if abs(a)!=a: cnt+=1
  ans.append(abs(a))
  mini=min(mini,abs(a))
if cnt%2==0:
  print(sum(ans))
else:
  print(sum(ans)-(mini*2))
# Judge status: Accepted
x=int(input())
if x in [3,5,7]:
    print("YES")
else:
    print("NO")
# Judge status: Accepted
# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


D = z()
C = zz()
S = defaultdict(list)
for i in range(D):
    S[i + 1] = zz()
for i in range(D):
    print(i % 26 + 1)
# Judge status: Accepted
s = input()
n = len(s)
dp = [ [0,0] for i in range(n) ]
dp[0][0] = int(s[0])
dp[0][1] = 11-int(s[0])
for i in range(n-1):
  d = int(s[i+1])
  dp[i+1][0] = min(dp[i][0]+d, dp[i][1]+d)
  dp[i+1][1] = min(dp[i][0]+11-d, dp[i][1]+9-d)
print(min(dp[n-1][0],dp[n-1][1]))
# Judge status: Wrong Answer
from sys import stdin
a,b,c = [int(x) for x in stdin.readline().rstrip().split()]
A = 0
B = 0
C = 0

for i in range(1,10**5):
    if i**2 >= a:
        A = i
        break
for i in range(1,10**5):
    if i**2 >= b:
        B = i
        break
for i in range(1,10**5):
    if i**2 >= c:
        C = i
        break
print(A,B,C)
if A + B <= C:
    print("Yes")
else:
    print("No")