peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
N,M=map(int,input().split())
if 2*N>=M:
    print(M//2)
if 2*N<M:
    L=M-2*N
    print(N+L//4)
# Judge status: Wrong Answer
k = int(input())

if k % 2 == 1:
    print((k + 1) // 2 * k // 2)
else:
    print(k // 2 * k // 2)
# Judge status: Accepted
N, K = map(int, input().split())
S = list(input())

diff = []
ans = 0
for i in range(N-1):
  if S[i] != S[i+1]:
    diff += [i]
  else:
    ans += 1

print(min(N-1, ans+2*min(K, len(diff))))
# Judge status: Accepted
#!/usr/bin/env python3

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

tmp = 1
for i in range(2, 1000):
    if i == (b-a):
        # print(tmp, tmp+i)
        print(tmp-a)
    tmp += i
# Judge status: Wrong Answer
n=[int(x) for x in list(input()[::-1])]+[0]
ans = 0
step = 0
for i in range(len(n)-1):
  x = n[i]+step
  if x < 5 or (x==5 and n[i+1]<5):
    ans += x
    step = 0
  else:
    ans += 10 - x
    step = 1
print(ans)
# Judge status: Accepted
n = int(input())
have_8_divisors = 0

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

    # 偶数の時はスキップ
    if i % 2 == 0:
        continue
    cnt = 0
    for j in range(1, i + 1):
        if i % j == 0:
            cnt += 1

    result = cnt == 8
    if result:
        have_8_divisors += 1

print(have_8_divisors)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    A, B, M = [int(x) for x in input().split()]
    a = [int(x) for x in input().split()]
    b = [int(x) for x in input().split()]
    XYC = [[int(x) for x in input().split()] for _ in range(M)]

    ans = min(a) + min(b)

    for x, y, c in XYC:
        tmp = a[x - 1] + b[y - 1] - c
        ans = min(ans, tmp)

    print(ans)



if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
n,m=map(int,input().split())
if n==m:
  print('AC')
else:
  print('WA')
# Judge status: Wrong Answer
from fractions import gcd
from functools import reduce
n = int(input())
l = list(int(input()) for _ in range(n))

def lcm_base(x,y):
  return x*y/gcd(x,y)

def lcm_list(t):
  return reduce(lcm_base,t,1)
  
print(int(lcm_list(l)))
# Judge status: Accepted
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri() - 1
li = []
while n >= 26:
  a = n%26
  li.append(a)
  n //= 26
  n -= 1
li.append(n)  
li.reverse()
ans = ''
for i in li:
  s = 'abcdefghijklmnopqrstuvwxyz'[i]
  ans += s
print(ans)
# Judge status: Wrong Answer
def main():
    ans = 10**9
    n = int(input())
    for i in range(1,int(n**0.5)+1):
        if n % i == 0:
            ans = min(ans,i+n//i)
    else:
        print(ans-2)


if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
D, N = map(int, input().split())

if D == 0:
  if N == 100:
    print(101)
  else:
    print(N)
elif D == 1:
  print(N * 100)
elif D == 2:
  print(N * 10000)
# Judge status: Accepted
import math


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

S = int(input())
ans = 0
mod = 10 ** 9 + 7
for i in range(1,700):
    x = S - 3 * i
    if x < 0:
        break
    ans += (combinations_count(x + i - 1, i - 1)) % mod
    ans %= mod
print(ans)
# Judge status: Accepted
N, M = map(int, input().split())

a = M // N
for i in range(a, 0, -1):
    if M % i == 0:
        print(i)
        break
# Judge status: Wrong Answer
if __name__ == "__main__":
    # 1 <= N <= 2 * 10^5
    # 1 <= K <= N + 1
    N, K = map(int, input().split(" "))

    total_num = 0
    for k in range(K, N+2):
        # NからN-(k-1)までの和
        sum_max = k*(2*N - k + 1) / 2
        # 0から(k-1)までの和
        sum_min = k*(k-1) / 2
        # 個数を計上
        total_num += sum_max - sum_min + 1
        total_num %= 1000000007
    
    print(total_num)
# Judge status: Accepted
line2 = []
for i in range(5):
    line = int(input())
    line2.append(line)
long = int(input())
if line2[4] - line2[0] <= long:
    print("Yay!")
else:
    print(":(")
# Judge status: Accepted
A,B = map(int,input().split())

print(max(2*A-1, A+B, 2*B-1))
# Judge status: Accepted
N = int(input())
X = N // 4 + 1
Z = N // 7 + 1
Y = sum(4*a + 7*b == N for a in range(X) for b in range(Z))
if (Y != 0):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
S=list(input())
N=int(input())

i=0
while i<len(S)-1:
    if S[i]!='a' and 123-ord(S[i])<=N:
        N-=123-ord(S[i])
        S[i]='a'
    i+=1

N=N%26
while N:
    if S[-1]=='z':
        S[-1]='a'
    else:
        S[-1]=chr(ord(S[-1])+1)
    N-=1

print(''.join(S))
# Judge status: Wrong Answer
n = int(input())
li = list(map(int,input().split()))
lis = []
x = 0
y = 0
z = 0
for i in range(n):
    if li[i] % 4 == 0:
        x += 1
    elif li[i] % 2 == 0:
        y = 1
    else:
        z += 1
if y == 0:
    if x >= y + 1:
        print("Yes")
    else:
        print("No")
else:
    if x >= y:
        print("Yes")
    else:
        print("No")
# Judge status: Accepted
# -*- coding: utf-8 -*-
k = int(input())
a, b = map(int, input().split())

msg = 'NG'

for i in range(a, b + 1):
  if i % k == 0:
    msg = 'OK'
    break

print(msg)
# Judge status: Accepted
import sys

n,*a=map(int,sys.stdin.read().split())

a.sort(reverse=True)
c=0
f=0
ans=[]
for i in range(n-1):
  if a[i]==a[i+1]:
    c+=1
    f+=1
    ans.append(a[i])
  else:
    f=0
  if (c>1 and f==1) or (c>2 and f==3):
    print(ans[0]*ans[-1])
    sys.exit()
print(0)
# Judge status: Wrong Answer
A,B,K = map(int,input().split())
Min = min(A,B)
c = 0
for i in range(1,Min+1):
  if A % i == 0 and B % i == 0:
    c += 1
    if c == K:
      print(i)
# Judge status: Wrong Answer
n, k = map(int, input().split())
x = list(map(int, input().split()))
time = 2 * 10 ** 8

for i in range(n - k + 1):
    l = x[i]
    r = x[i + k - 1]
    if l < 0 and r > 0:
        if abs(l) >= abs(r):
            total = abs(l) + abs(r) * 2
        else:
            total = abs(l) * 2 + abs(r)
    elif l >= 0:
        total = r
    else:
        total = abs(l)
    time = min(time, total)

print(time)
# Judge status: Accepted
# -*- coding: utf-8 -*-

def main():
    import sys
    import math

    N = list(map(int, sys.stdin.readline().split()))
    A_list = list(map(int, sys.stdin.readline().split()))

    money = 1000

    for i in range(1,len(A_list)):
        if A_list[i] > A_list[i-1]:
            stock = money // A_list[i-1]
            money -= (stock * A_list[i-1])

            money += (stock * A_list[i])
    
    
    print(money)


if __name__ == "__main__":
    main()
# Judge status: Accepted
from functools import reduce
import sys


def dump(x):
    print(x, file=sys.stderr)


s = input()
t = input()

min_diff = 100000000000


for i in range(len(s)-len(t)+1):
    matches = [1 if s[i+j] != t[j] else 0 for j in range(len(t))]
    diffn = sum(matches)
    min_diff = min(diffn,min_diff)
    dump(min_diff)

print(min_diff)
# Judge status: Wrong Answer

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

def main(N, M, K):
    for i in range(0, N+1):
        for j in range(0, M+1):
            if N * (M - j) + M * (N - i) == K:
                return True
    return False

res = main(N, M, K)

if res == True:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
import sys
# input
k = int(input())
a, b = map(int, input().split())
#print(f"k >>{k}, a >>{a}, b >>{b}")


for i in range(a, b):
    if (i % k == 0):
        print("OK")
        sys.exit(0)

print("NG")
# Judge status: Accepted
n = int(input())
d = [int(i) for i in input().split()]

d.sort()

ans = d[len(d)//2] - d[len(d)//2-1]
print(ans)
# Judge status: Accepted
n,k = map(int,input().split())
p = list(map(int,input().split()))
u = sum(p[0:k])
maxsum = u
for i in range(1, n-k+1):
	u = u + p[i+k-1] - p[i-1]
	if u >= maxsum:
		maxsum = u
print((maxsum+k)/2)
# Judge status: Accepted
def main():
    n = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for a in A[::2]:
        if a % 2 == 1:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
a, b, c, d = (int(x) for x in input().split())

if a <= c <= b:
    if d <= b:
        print(d-c)
    else:
        print(b-c)
elif c <= a:
    if b <= d:
        print(b-a)
    elif a <= d <= b:
        print(d-a)
    else:
        print(0)
else:
    print(0)
# Judge status: Accepted
n = int(input())
t, a = map(int, input().split())
h = list(map(int, input().split()))
d = []

for i in range(n):
    temp = 0
    temp = t - h[i]*0.006
    d += [abs(a - temp)]
print(d.index(min(d))+1)
# Judge status: Accepted
n,m=[int(_) for _ in input().split()]
p=[0 for i in range(m)]
s=[0 for i in range(m)]
for i in range(m):
    _p,_s=input().split()
    p[i]=int(_p)-1
    s[i]=_s

ac=[False for i in range(n)]
wa=[0 for i in range(n)]

for  i in range(m):
    if s[i]=="WA" and not(ac[p[i]]):
        wa[p[i]]+=1
    else:
        ac[p[i]]=True

for i in range(n):
    if not(ac[i]):
        wa[i]=0

print(sum(ac),sum(wa))
# Judge status: Accepted
import sys
n,k=map(int,input().split())
l=list(map(int,input().split()))
dp=[sys.maxsize]*n
dp[0]=0
for i in range(n):
    for j in range(i+1,i+k+1):
        if j<n:
            dp[j]=min(dp[j], dp[i]+ abs(l[i]-l[j]))


print(dp[-1])
# Judge status: Accepted
mod = 10**9+7
n = int(input())
A = list(map(int,input().split()))
c01 = [[0,0] for i in range(60)]
for a in A:
    for j in range(60):
        if a>>j &1:
            c01[j][1] += 1
        else:
            c01[j][0] += 1
ans = 0
for i in range(60):
    ans += 2**i *c01[i][0]*c01[i][1]
    ans%=mod
print(ans)
# Judge status: Accepted
n, a, b = map(int, input().split())
if (b - a) % 2:
    print((b - a - 1) // 2 + 1 + min(n - b, a - 1))
else:
    print((b - a) // 2)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(8):
    # print(1)
    if len([j for j in a if j > 400*i-1 and j < 400*(i+1)]) > 0:
       ans += 1 
ans_min = ans
ans_max = ans + len([i for i in a if 3200 <= i])
print(max(ans_min,1),max(ans_max,1))
# Judge status: Accepted
c = input()

vowel = ["a", "e", "i", "o", "u"]
if c in vowel:
    print("vowel")
else:
    print("consonant")
# Judge status: Accepted
N , Y = map(int,input().split())
k = 0
for i in range(N+1):
  x = i
  for j in range(N - i + 1):
    y = j
    if (Y - x * 10000 - y*5000)/1000 == N - x - y >=0 :
      print(str(x) +' '+str(y)+' '+str(N-x-y))
      k = 1
      break
  if k == 1:
    break
if k== 0:
  print('-1 -1 -1')
# Judge status: Accepted
n=int(input())
a=[int(input()) for i in range(n)]
d={}
for i in range(n):
  if a[i] in d:
    d[a[i]]+=1
  else:
    d[a[i]]=1
cnt=0
d=list(d.items())
for i in range(len(d)):
  if d[i][1]%2==1:
    cnt+=1
print(cnt)
# Judge status: Accepted
S = input()

if len(S) == 1:
    print(1)
    exit()

ans = 1
tmp1 = S[0]
tmp2 = ""

for i in range(1,len(S)):
    tmp2 += S[i]
    if tmp1 == tmp2:
        continue
    else:
        ans += 1
        tmp1 = tmp2
        tmp2 = ""

print(ans)
# Judge status: Accepted
N = int(input())
A = list(map(int,input().split()))
money = 1000

for i in range(N-1):
  if A[i] < A[i+1]:
    money += (money//A[i])*(A[i+1]-A[i])

print(money)
# Judge status: Accepted
def main():
    import sys
    input = lambda:sys.stdin.readline().strip()
    
    s = int(input())

    v = 10**9

    x = (v-s%v)%v
    y = (s+x)//v

    print(0,0,10**9,1,x,y)

if __name__=='__main__':
    main()
# Judge status: Wrong Answer
a,b,t = map(int,input().split())
t = t+0.5
cnt = t//a

print(cnt*b)
# Judge status: Accepted
#099_C
n=int(input())
def Count(x,p):
    res=0
    while x:
        res+=x%p
        x=x//p
    return res

ans=10**6+1
for i in range(0,n+1):
    ans=min(ans,Count(i,6)+Count(n-i,9))
    
print(ans)
# Judge status: Accepted
n=int(input())


ans="No"
for i in range(1,10):
    for j in range(1,10):
        if i*j==n:
            ans="Yes"

print(ans)
# Judge status: Wrong Answer
s = input()
l = len(s)

for i in range(2**(l-1)):
    ans = 0
    a = s[0]
    for j in range(l-1):
        if i >> j == 0:
            a += '+' + s[j+1]
        else:
            a += '-' + s[j+1]
    ans = eval(a)
    if ans == 7:
        print(a + '=7')
        exit()
# Judge status: Accepted
a,b,c = map(int,input().split())
if b//a>=c: print(c)
else: print(b//a)
# Judge status: Accepted
import bisect
from collections import deque
n = int(input())
color = [-1]*n

for i in range(n):
    a = int(input())
    color[bisect.bisect_left(color,a) - 1] = a

ans = n - bisect.bisect_right(color,-1)
print(ans)
# Judge status: Wrong Answer
a,b = map(int,input().split())

if a+b % 2 ==0:
  print(int((a+b)/2))
else:
  print("IMPOSSIBLE")
# Judge status: Wrong Answer
from math import log
n = int(input())


def make_list(n, x):
    return [x ** i for i in range(1, int(log(n, x))+1)]


sixes = make_list(n, 6)
nines = make_list(n, 9)
nums = [1] + sixes + nines

dp = [float('inf')] * (n+1)
for num in nums:
    for i in range(1, n+1):
        if i <= num:
            dp[i] = min(dp[i], num)
        else:
            dp[i] = min(dp[i], dp[i-num]+1)
print(dp[n])
# Judge status: Wrong Answer
N, K = map(int, input().split())
sunu = [0] * (N + 1)
for _ in range(0, K):
    a = list(map(int, input().split()))
    for s in a:
        sunu[s] += 1

print(sunu.count(0))
# Judge status: Wrong Answer
a,b= list(map(int, input().split()))
if a>13:
    print(b)
if a>6<12:
    print(b/2)
if a<5:
    print('0')
# Judge status: Accepted
s=[input() for i in range(3)]
t=0
while 1:
    if not s[t]:
        break
    if s[t][0]=="a":
        s[t],t=s[t][1:],0
    elif s[t][0]=="b":
        s[t],t=s[t][1:],1
    else:
        s[t],t=s[t][1:],2
if t==0:
    print("A")
elif t==1:
    print("B")
else:
    print("C")
# Judge status: Accepted
n = int(input())
 
h = list(map(int,input().split()))
 
height = h[0]
 
q = 0
 
for i in h:
    if i < height:
        q = 1
        break
    elif i > height:
        height = i-1
    else:
        height = i
        
if q == 1:
    print("No")
else:
    print("Yes")
# Judge status: Wrong Answer
from collections import Counter

n = int(input())
s = [Counter(input()) for _ in range(n)]

cnt = s[0]
for scnt in s:
    for str in (scnt | cnt):
        print(str)
        cnt[str] = min(cnt[str], scnt[str])

a = ord('a')
ans = [chr(a + i) * cnt[chr(a + i)] for i in range(25)]
print(*ans, sep='')
# Judge status: Accepted
n = int(input())
s = input()
t = input()
ans = 2 * n
for i in range(n):
  if s[i:] == t[:n - i]:
    ans = n + i
    break
print(ans)
# Judge status: Accepted
n=int(input())
*a,=map(int, input().split( ))
b4=0;od=0;
for i in range(n):
    if a[i]%2:
        od+=1
    elif a[i]%4==0:
        b4+=1
if od>b4+1:
    print("No")
elif od==b4+1 and od+b4<n:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
import sys
n= int(input())
an = list(map(int, sys.stdin.readline().split()))
ans = [0]*n
for i in range(n):
    ans[an[i]-1] = i+1

print(*ans)
# Judge status: Accepted
S = list(input())
if S[0] == S[1] and S[0] == S[2]:
    print("No")
else:
    print("Yes")
# Judge status: Accepted
import re
S = input()
k = 'keyence'
for i in range(0, len(k)+1):
    rs = '^' + k[:i] + '.*' + k[i:] + '$'
    if re.match(rs, S) is not None:
        print('YES')
        break
else:
    print('NO')
# Judge status: Accepted
print("2018" + str(input())[4:])
# Judge status: Wrong Answer
n, *lst = map(int, open(0).read().split())
if n < 3:
  print(0)
  quit()
group = 1
start = lst[1] > lst[0]
for i in range(2, n - 1):
  if (lst[i] > lst[i - 1]) == start:
    continue
  else:
    start = lst[i + 1] > lst[i]
    group += 1
if (lst[-1] > lst[-2]) != start:
  group += 1
print(group)
# Judge status: Wrong Answer
N,A,B=map(int,input().split())
if A>B:
    print(0)
elif A==B:
    print(1)
else:
    if N==1:
        print(0)
    else:
        print((B*N-A*N)+1)
# Judge status: Accepted
x ,y=map(int,input().split())

if x*2 <= y <= x*4 and y%2==0:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
list=[1, 1, 1, 1, 1]
for i in range(1, 7):
  list.append(6**i)
for j in range(1, 7):
  list.append(9**j)
list=sorted(list, reverse=True)
print(list)
N=128
count=0
for i in list:
  if i <= N:
    N=N-i
    count+=1
    if N == 0:
        print(count)
# Judge status: Accepted
n, m, k = map(int, input().split())
a = list(map(int, input().split())) 
b = list(map(int, input().split()))

from bisect import bisect_right
if n>m:
    a, b = b, a
    n, m = m, n
c = [b[0]]
for i in range(1, m):
    c.append(c[-1]+b[i])
a.insert(0,0)
x = 0
result = [0]
for i in range(n+1):
    x += a[i]
    if x > k:
        break
    y = k - x
    z = bisect_right(c, y)
    result.append(z+i)
print(max(result))
# Judge status: Accepted
a,b,c=map(int,input().split())
if a+b ==c or a+c ==b or b+c ==a:
	print('Yes')
else:
	print('No')
# Judge status: Accepted
N = int(input())
tmp = N % 10

if tmp == 2 or tmp == 4 or tmp == 5 or tmp == 7 or tmp == 9:
    print('hon')
elif tmp == 0 or tmp == 1 or tmp == 6 or tmp == 8:
    print('pon')
else:
    print('bon')
# Judge status: Accepted
N = int(input())
MOD_BY = 10**9 + 7
  
a = pow(10,N,MOD_BY)
b = pow(9,N,MOD_BY)
c = pow(8,N,MOD_BY)
ans = a - 2*b + c
print(ans%MOD_BY)
# Judge status: Accepted
import itertools
N = int(input())
L = list(map(int,input().split()))
count = 0
for l in itertools.combinations(L,3):
    l = sorted(l)
    if l[1] == l[2] or l[0] == l[1]:
        continue
    if l[2] < l[1]+l[0]:
        count+=1
print(count)
# Judge status: Wrong Answer
N = list(map(int,input().rstrip().split()))
n = N[0]
k = N[1]

h = list(map(int,input().split()))
h.sort(reverse=True)

m = 0
hit = 0
if k >= n :
  m = 0
else:
  for i in range(k,n):
    hit += h[i]
  
  m = hit
print(type(m))
print(m)
# Judge status: Accepted
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    sx, sy, tx, ty = map(int, rl().split())
    dx, dy = tx - sx, ty - sy
    
    ans = 'U' * dy + 'R' * dx
    ans += 'D' * dy + 'L' * dx
    ans += 'L' + 'U' * (dy + 1) + 'R' * (dx + 1) + 'D'
    ans += 'R' + 'D' * (dy + 1) + 'L' * (dx + 1) + 'U'
    print(ans)


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

counter = 0
for i in range(len(S)):
    second = 0
    group = S[i:i+len(T)]
    if len(group) < len(T):
        break
    for j in range(len(T)):
        if T[j] != group[j]:
            second += 1
    if counter == 0:
        counter = second
    elif second < counter:
        counter = second


print(counter)
# Judge status: Accepted
d = input()
dL = len(d)
dE = dL - 3
Min = 10000000000

for i in range(0, dE+1):
  D = int(d[i:i+3])
  J = abs(D - 753)
  if J < Min:
    Min = J

print(Min)
# Judge status: Accepted
from math import atan as arctan
from math import degrees


def main():
    a, b, x = map(int, input().split(" "))
    bottom_area = x / a
    if bottom_area >= a * b / 2:
        print(abs(degrees(arctan((2 * x / (a ** 3)) - (2 * b / a)))))
    else:
        print(90 - degrees(arctan(2 * x / a / (b ** 2))))


if __name__ == '__main__':
    main()
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
a.sort()
b=a[n//2-1]
c=a[n//2]
print(max(c-b,0))
# Judge status: Accepted
k = int(input())

x = 7 % k

s = [0] * k
i = 1

while s[x] == 0:
    if x == 0:
        print(i)
        exit()
    s[x] = 1
    x = (x * 10 + 7) % k
    i += 1

print('-1')
# Judge status: Accepted
import bisect
n = int(input())
A = list(int(input()) for _ in range(n))
B = [A[n-1]]

for i in range(n-2,-1,-1):
    if A[i] >= B[-1]:
        B.append(A[i])
    else:
        B[bisect.bisect_right(B,A[i])] = A[i]
print(len(B))
# Judge status: Accepted
l = ['SUN','MON','TUE','WED','THU','FRI','SAT']
s = input()
i = l.index(s)
print(7-i)
# Judge status: Accepted
from operator import itemgetter, attrgetter
N, *A = map(int, open(0).read().split())
*A, = zip(*[iter(A)]*2)

if N % 2 == 0:
    A.sort()
    mid_l = A[N//2-1][0]+A[N//2][0]
    A.sort(key=itemgetter(1))
    mid_r = A[N//2-1][1]+A[N//2][1]
    print(mid_r - mid_l+1)
else:
    A.sort()
    mid_l = A[N//2][0]
    A.sort(key=itemgetter(1))

    mid_r = A[N//2][1]
    print(mid_r - mid_l+1)
# Judge status: Accepted
k,x=map(int,input().split())

for i in range(x-k+1,x+k):
  print(i,end=" ")
# Judge status: Accepted
n=int(input())
import math
print(n*math.pi*2)
# Judge status: Accepted
N = int(input())
num = []
for _ in range(N + 1):
    num.append(1)
for i in range(2, N + 1):
    cnt = 1
    while cnt * i <= N:
        num[cnt * i] += 1
        cnt += 1
ans = 0
for i in range(1, N + 1):
    ans += num[i] * i
print(ans)
# Judge status: Accepted
import itertools
N, M, Q = map(int, input().split())
arr = [list(map(int, input().split())) for _ in range(Q)]
ans = 0
for i in itertools.combinations_with_replacement(range(1,M+1),N):
    tmp = 0
    for item in arr:
        if i[item[1]-1] - i[item[0]-1] == item[2]:
            tmp += item[3]
    ans = max(ans,tmp)
print(ans)
# Judge status: Wrong Answer
a, b, c = input().split()
    
print("A", b[0], "C")
# Judge status: Accepted
N=int(input())

a=[0]*N
a=list(map(int,input().split()))
ans=0
for i in range(1,N+5,2):
    if(N<i):
        break
    if(a[i-1]%2==1):
        ans=ans+1
print(ans)
# Judge status: Wrong Answer
string = input()
index = string.index("A")
count = 0
i = index
while string[i] != "Z":
  count +=1
  i+=1
print(count)
# Judge status: Accepted
n, K = map(int,input().split())
A = list(map(int,input().split()))
b = [0 for _ in range(n+1)]

for _ in range(K):
    for i,a in enumerate(A):
        b[max(0, i-a)] += 1
        b[min(n, i+a+1)] -= 1

    for i in range(n):
        b[i+1] += b[i]
    A = b[:-1]
    b = [0 for _ in range(n+1)]
    if sum(A) == n*n:
        break
    
print(*A)
# Judge status: Accepted
#<C>
N = int(input())
H = list(map(int, input().split()))
ans = 0
for n in range(N):
    if ans - 1 > H[n]:
        print("No")
        exit()
    ans = max(ans,H[n])
print("Yes")
# Judge status: Accepted
N = int(input())
out = []
def Saiki(N):
  w = N // 26
  z = N % 26
  ca = 1
  if(z == 0):
    w -= 1
    z = 26
  ca += z - 1
  out.insert(0, chr(ca + 96))
  if(w == 0): return
  Saiki(w)
Saiki(N)
print(''.join(out))
# Judge status: Accepted
A, B, X = [int(i) for i in input().split()]
print("YES" if A <= X <= A+B else "NO")
# Judge status: Accepted
S = input()

key = list("keyence")
target = 'keyence'

flg = False
for i in range(len(S)):
    for j in range(len(S)):
        tmp = S[0:i]+S[j:]

        if tmp == target and not flg:
            print("YES")
            flg = True
            break

if not flg:
    print("NO")
# Judge status: Accepted
X,Y=map(int,input().split())
result = []
while Y >= X:
  result.append(X)
  X *= 2
print(len(result))
# Judge status: Accepted
x, y = map(int, input().split())

f = lambda x: 10**10 if x < 0 else x

print(min(f(y-x), f(y+x)+1, f(-y-x)+1, f(-y+x)+2))
# Judge status: Accepted
a, b, c = map(int, input().split())
k = int(input())
from itertools import permutations, product
comb_lst = list(product([0,1,2], repeat = k))
flag = False
for comb in comb_lst:
    abc_lst = [a, b, c]
    for num in comb:
        abc_lst[num] *= 2
    if abc_lst[0] < abc_lst[1] and abc_lst[1] < abc_lst[2]:
        flag = True

print('Yes' if flag == True else 'No')
# Judge status: Accepted
def resolve():
	s = input()
	d = {}
	ans = 'yes'
	for i in s:
		if d.get(i):
			ans = 'no'
			break
		d[i] = True
	print(ans)
resolve()
# Judge status: Accepted
W, H, x, y = map(int, input().split())

if x == W/2 and y == H/2:
    flag = 1
else:
    flag = 0
print(W*H/2, flag)
# Judge status: Accepted
a,b,c=map(int,input().split())
if(c>=a and c<=b):
    print("Yes")
else:
    print("No")
# Judge status: Accepted
def main():
    N = int(input())
    A = [int(input()) for i in range(N)]
    from collections import Counter
    c = Counter(A)
    ans = 0
    for v in c.values():
        if v % 2:
            ans += 1
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
N = int(input())
A = list(map(int, input().split()))

A.sort(key=lambda x: -x)

l = []

a_old = -1
for a in A:
    if a_old == a:
        l.append(a)
        a_old = -1
    else:
        a_old = a

l.append(0)
l.append(0)

print(l[0] * l[1])