Harryxun/stf_run huggingface dataset:
from operator import mul
from functools import reduce


def cmb(n, r):
    r = min(n-r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


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

for i in range(K):
    a = cmb(K-1, i)
    b = cmb(R+1, i+1)
    print((a*b) % (10**9+7))


### FIXED CODE ###

from operator import mul
from functools import reduce


def cmb(n, r):
    if r > n:
        return 0
    r = min(n-r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


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

for i in range(K):
    a = cmb(K-1, i)
    b = cmb(R+1, i+1)
    print((a*b) % (10**9+7))
n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
if a[0]==0:
    print(0)
    exit()

dp=[0]*(n+1)
dp[0]=1

for i in range(1,n+1):
    if i in a:
        dp[i]=0
        continue

    dp[i]=dp[i-1]
    if i>1:dp[i]+=dp[i-2]
    dp[i]%=1000000007
print(dp[-1])

### FIXED CODE ###

import sys
n,m=map(int,input().split())
a=set(map(int,sys.stdin))
dp=[0]*(n+1)
dp[0]=1
if 1 not in a:dp[1]=1
for i in range(2,n+1):
    if i in a:continue
    if dp[i-1]==dp[i-2]==0:break
    dp[i]=(dp[i-1]+dp[i-2])%1000000007
print(dp[-1])
if input() == "1":
    print("Hello World")
else:
    print(int(input()+int(input())))

### FIXED CODE ###

if input() == "1":
    print("Hello World")
else:
    print(int(input())+int(input()))
def abc():
    a, b, c = map(int, input().split())
    n = list(range(a, b + 1))
    s = sorted(set(n[:c]) | set(n[-c:]))
    for _s in s:
        print(_s)


abc()


### FIXED CODE ###

def abc():
    a, b, c = map(int, input().split())
    n = range(a, b + 1)
    for s in sorted(set(n[:c]) | set(n[-c:])):
        print(s)


abc()
s = input()
s[3] = '8'
print(s)

### FIXED CODE ###

s = input()
r = s[:3]+'8'+s[4:]
print(r)
from collections import deque
n, k = map(int, input().split())
p = list(map(int, input().split()))
t = 0
res = 0
c = 0
for i in range(k - 1):
    if p[i] > p[i + 1]:
        c += 1
if c == 0:
    t = 1
    res += 1
for i in range(k - 1, n - 1):
    if p[i] > p[i + 1]:
        c += 1
    if p[i - k + 1] > p[i - k + 2]:
        c -= 1
    if c == 0:
        t = 1
        res += 1
k -= 1
qa = deque([])
a = [0] * (n - k + 1)
qb = deque([])
b = [0] * (n - k + 1)
for i in range(n):
    while qa and p[qa[-1]] > p[i]:
        qa.pop()
    while qb and p[qb[-1]] < p[i]:
        qb.pop()
    qa.append(i)
    qb.append(i)
    if qa[0] == i - k:
        qa.popleft()
    if qb[0] == i - k:
        qb.popleft()
    a[i - k + 1] = p[qa[0]]
    b[i - k + 1] = p[qb[0]]
exit(0)
ans = 1
for i in range(n - k - 1):
    if p[i] > a[i + 1] or b[i + 1] > p[i + k + 1]:
        ans += 1
print(ans + t - res)


### FIXED CODE ###

from collections import deque
n, k = map(int, input().split())
p = list(map(int, input().split()))
c = 0
l = [1] * (n - k + 1)
for i in range(k - 1):
    if p[i] > p[i + 1]:
        c += 1
if c == 0:
    l[0] = 0
for i in range(k - 1, n - 1):
    if p[i] > p[i + 1]:
        c += 1
    if p[i - k + 1] > p[i - k + 2]:
        c -= 1
    if c == 0:
        l[i - k + 2] = 0
k -= 1
qa = deque([])
a = [0] * (n - k + 1)
qb = deque([])
b = [0] * (n - k + 1)
for i in range(n):
    while qa and p[qa[-1]] > p[i]:
        qa.pop()
    while qb and p[qb[-1]] < p[i]:
        qb.pop()
    qa.append(i)
    qb.append(i)
    if qa[0] == i - k:
        qa.popleft()
    if qb[0] == i - k:
        qb.popleft()
    if i >= k - 1:
        a[i - k + 1] = p[qa[0]]
        b[i - k + 1] = p[qb[0]]
ans = l[0]
for i in range(n - k - 1):
    if (p[i] > a[i + 1] or b[i + 1] > p[i + k + 1]) and l[i + 1]:
        ans += 1
print(ans + 1 - min(l))
import collections
 
N = int(input())
S = list(input())
 
CNT_S = collections.Counter(S)
 
cnt_r = CNT_S['R']
cnt_b = CNT_S['B']
cnt_g = CNT_S['G']
 
total = cnt_r * cnt_g * cnt_b
subdu = 0
 
 
for pos in range(N):
    for i in range(1, N):
    
        index_r = pos
        index_m = pos + i
        index_l = pos + 2 * i
        
        if (index_l < N and index_m < N and index_r < N):
            if (S[index_l] != S[index_m] and S[index_l] != S[index_r] and S[index_m] != S[index_r]):
                subdu += 1
 
 
ans = total - subdu
 
print(ans)

### FIXED CODE ###

import collections

N = int(input())
S = list(input())

CNT_S = collections.Counter(S)

cnt_r = CNT_S['R']
cnt_b = CNT_S['B']
cnt_g = CNT_S['G']

total = cnt_r * cnt_g * cnt_b
subdu = 0


for pos in range(N):
    for i in range(1, N):
    
        index_r = pos
        index_m = pos + i
        index_l = pos + 2 * i
        
        if (index_l < N and index_m < N and index_r < N):
            if (S[index_l] != S[index_m] and S[index_l] != S[index_r] and S[index_m] != S[index_r]):
                subdu += 1


ans = total - subdu

print(ans)
A = int(input())
B = int(input())
print(A*B)

### FIXED CODE ###

x, y = map(int, input().split())
print(x*y)
n,m=map(int,input().split());d={0:1}
for i in input().split():d[int(i)%m]+=1
print(sum(map(lambda x:x*(x-1)//2,d.values())))

### FIXED CODE ###

from itertools import accumulate
from collections import Counter
import math

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

n,m=map(int,input().split())
s=list(map(lambda x:x%m,list(accumulate(list(map(int,input().split()))))))
s.append(0)
#print(s)
d=Counter(s)
#print(d)
ans=0
for i in d:
    if d[i]>=2:
        ans+=combinations_count(d[i],2)
print(ans)
import fractions
from functools import reduce

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

def mygcd(a,b):
    if a==0:
        return b
    elif b==0:
        return a
    else:
        return fractions.gcd(a,b)


def L(n):
    if n==-1:
        return 0
    else:
        return mygcd(L(n-1),A[n])

def R(n):
    if n==N:
        return 0
    else:
        return mygcd(R(n+1),A[n])

ans=1
for i in range(N):
    c=mygcd(L(i-1),R(i+1))
    ans=max(ans,c)

print(ans)

### FIXED CODE ###

import sys

sys.setrecursionlimit(1000000)

import fractions
from functools import reduce

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

def mygcd(a,b):
    if a==0:
        return b
    elif b==0:
        return a
    else:
        return fractions.gcd(a,b)

L=[0]*N
for i in range(1,N):
    L[i]=mygcd(L[i-1],A[i-1])

R=[0]*N
for i in range(N-2,-1,-1):
    R[i]=mygcd(R[i+1],A[i+1])

ans=1
for i in range(N):
    c=mygcd(L[i],R[i])
    ans=max(ans,c)

print(ans)
N,K=map(int,input().strip().split())
A=list(map(int,input().strip().split()))

d={}

for n in range(N):
    if d.get(A[n])==None:
        d[A[n]]=1
    else:
        d[A[n]]+=1

dn=sorted(d.items(),key=lambda x:x[1])

if K>=len(d):
    print(0)
else:
    cnt=0
    ans=0
    for n in range(len(dn)):
        ans+=dn[n][1]
        cnt+=1
        if cnt==len(d)-K:
            break
print(ans)
    

### FIXED CODE ###

N,K=map(int,input().strip().split())
A=list(map(int,input().strip().split()))

d={}

for n in range(N):
    if d.get(A[n])==None:
        d[A[n]]=1
    else:
        d[A[n]]+=1

dn=sorted(d.items(),key=lambda x:x[1])

if K>=len(d):
    print(0)
else:
    cnt=0
    ans=0
    for n in range(len(dn)):
        ans+=dn[n][1]
        cnt+=1
        if cnt==len(d)-K:
            break
    print(ans)
n, d = map(int, input().split())
a = n // (2*d + 1) + 1
print(a)

### FIXED CODE ###

a = int(input())
s = a**2 * 3
print(s)
n = int(input())
s = input()
r = s.count("R")
g = s.count("G")
b = s.count("B")
cnt= 0
for i in range(n):
    for j in range(i,n):
        if s[i] != s[j] and s[i] != s[2*j-i] and s[j] != s[2*j-i] and 2*j-i<n:
            cnt += 1
print(r*g*b-cnt)

### FIXED CODE ###

# abc162_d.py
n = int(input())
s = input()
r = s.count("R")
g = s.count("G")
b = s.count("B")
cnt= 0
for i in range(n):
    for j in range(i,n):
        if 2*j-i<n:
            if s[i] != s[j] and s[i] != s[2*j-i] and s[j] != s[2*j-i]:
                cnt += 1
print(r*g*b-cnt)
S = input()
if S == 'Sunny':
  print('Cloudy')
elif S =='Cloudy':
  print('Rainy')
else S=='Rainy':
  print('Sunny')

### FIXED CODE ###

S = input()
if S == 'Sunny':
    print('Cloudy')
elif S =='Cloudy':
    print('Rainy')
else:
    print('Sunny')
S = int(input())
W = int(input())
if S > W:
  print("safe")
else:
  print("unsafe")

### FIXED CODE ###

s, w = map(int, input().split())
 
if s <= w:
  print('unsafe')
else:
  print('safe')
s = list(input())
n = len(s)
for i in range(0,n-1):
	if i == n-2:
		if s[i] == s[i+1]:
			n-=1
		break
	if s[i]==s[i+1]:
		s[i+1]+=s[i+2]
		s.pop(i+2)
		n-=1
print(n)8

### FIXED CODE ###

s = list(input())
ans = 0
length = 1
Si = s[0]
loop = [0]
for i in loop:
	Si_1 = ""
	for j in range(0,length):
		Si_1 += s[i+1+j]
	if Si == Si_1:
		length += 1
		i -= 1
		loop.append(i+1)
	else:
		ans += 1
		i += length - 1
		length = 1
		Si = Si_1
		loop.append(i+1)
	if i + length + 1 == len(s):
		ans += 1
		break
print(ans)
a,b = map(int, input().split())
if a > b :
    print("GREATER")
esle:
    print("LESS")

### FIXED CODE ###

a = int(input())
b = int(input())
if a > b:
    print("GREATER")
elif a < b :
    print("LESS")
else:
    print("EQUAL")
N = int(input())
lst = list(map(int, input().split()))
boolean = False
updated_lst = []
minimum = min(lst)
min_num = 0
for i in lst:
  num = i % minimum
  if (i != minimum):
    updated_lst.append(num)
  else:
    updated_lst.append(minimum)
    min_num += 1
  if (num % 2 == 1):
    boolean = True

sum = sum(updated_lst)

if (sum == minimum*min_num):
  print(minimum)
else:
  if (boolean):
    print(1)
  else:
    print(min(updated_lst)  

### FIXED CODE ###

import fractions
N = int(input())
lst = list(map(int, input().split()))
ans = lst[0]
for i in range(1, N):
    ans = fractions.gcd(ans, lst[i])
print(ans)
N, M = input().split()
for i in range(1, M+1):
    a, b = input().split()
for i in range(1, N+1):
    print(a.count("i")+b.count("i")

### FIXED CODE ###

n, m = map(int, input().split())
a, b = [0]*m, [0]*m
for i in range(m):
    a[i], b[i] = map(int, input().split())
for j in range(1,n+1):
    print(a.count(j)+b.count(j))
import sys
sys.setrecursionimit(200000)
n,l=map(int,input().split())
r=list(map(int,input().split()))
last=0;tiepoint=0
for i in range(n-1):
  if r[i]+r[i+1]>last:
    last=r[i]+r[i+1]
    tiepoint=i
if last>=l:
  print("Possible")
  for i in range(n-1):
    if i==tiepoint:continue
    print(i+1)
  print(tiepoint+1)
else:print("Impossible")


### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)
n,l=map(int,input().split())
r=list(map(int,input().split()))
last=0;tiepoint=0
for i in range(n-1):
  if r[i]+r[i+1]>last:
    last=r[i]+r[i+1]
    tiepoint=i
if last>=l:
  print("Possible")
  for i in range(tiepoint):
    print(i+1)
  for i in range(tiepoint+1,n-1)[::-1]:
      print(i+1)
  print(tiepoint+1)
else:print("Impossible")
n = int(input())
tst = [[] for i in range(n)]
for i in range(n):
    a = int(input())
    for j in range(a):
        x,y = map(int,input().split())
        st[i].append([x,y])
ans = 0
for bit in range(1<<n):
    honest = [0]*n
    check = 1
    for i in range(n):
        if (bit>>i)&1:
            honest[-1-i] = 1
    for i in range(n):
        if not honest[i]:
            continue
        for l in tst[i]:
            if l[1]!=honest[l[0]-1]:
                check = 0
                break
    if check:
        ans = max(ans,sum(honest))
print(ans)

### FIXED CODE ###

n = int(input())
tst = [[] for i in range(n)]
for i in range(n):
  a = int(input())
  for j in range(a):
    x,y = map(int,input().split())
    tst[i].append([x,y])
ans = 0
for bit in range(1<<n):
  liars = [0]*n
  check = 1
  for i in range(n):
    if (bit>>i)&1:
      liars[-1-i] = 1
  for i in range(n):
    if liars[i]:
      for l in tst[i]:
        if l[1]!=liars[l[0]-1]:
          check = 0
          break
  temp = 0
  if check:
    temp = sum(liars)
  ans = max(ans,temp)
print(ans)
A=int(inport())
P=int(inport())

pai=(3*A+P)/2
print(pai)

### FIXED CODE ###

A,P= map(int, input().split())
print((3*A+P)//2)
bingo = [[],[],[]]
 
for i in range(3):
  a, b, c = map(int,input().split())
  bingo[i].append(a)
  bingo[i].append(b)
  bingo[i].append(c)
  
N = int(input())
if N < 9:
  print("No")
  
'''for i in range(N):
  S = int(input())
  for j in range(3):
    if S in bingo[j]:
      for k in range(3):
        if S == bingo[j][k]:
          bingo[j][k] = 'ok'
          
ANS = 0
 
for i in range(3):
  for j in range(3):
    if bingo[i][j] == 'ok':
      ANS += 1
      if ANS == 3:
        print("Yes")
  ANS = 0
 
for i in range(3):
  for j in range(3):
    if bingo[j][i] == 'ok':
      ANS += 1
      if ANS == 3:
        print("Yes")
  ANS = 0
 
if bingo[1][1] == 'ok':
  if bingo[0][0] == 'ok' and bingo[2][2] == 'ok':
    print("Yse")
  elif bingo[0][2] == 'ok' and bingo[2][0] == 'ok':
    print("Yse")
 
 
print("No")'''

### FIXED CODE ###

N = int(input())
print(int((N+1)/2))
n = int(input())
for i in range(1, 10):
    if 100*i + 10*i + i => n:
        print(100*i + 10*i + i)

### FIXED CODE ###

n = int(input())
for i in range(1, 10):
    if (100*i + 10*i + i ) >= n:
        print(100*i + 10*i + i)
        exit()
from operator import itemgetter
n, m = map(int, input().split())
bridge = 0
ab = []
for _ in range(m):
  a, b = map(int, input().split())
  ab.append((a,b))
ab = sorted(ab, key=itemgetter(1))
count = 0
for a, b in ab:
  if not a <= bridge <= b:
    counr += 1
    bridge = b
print(count)


### FIXED CODE ###

from operator import itemgetter
n, m = map(int, input().split())
bridge = 0
ab = []
for _ in range(m):
  a, b = map(int, input().split())
  ab.append((a,b))
ab = sorted(ab, key=itemgetter(1))
count = 0
for a, b in ab:
  if not a <= bridge <= b:
    count += 1
    bridge = b-1
print(count)
hoge = input()
hoge = hoge.split(" ")
N = int(hoge[0])
K = int(hoge[1])
Q = int(hoge[2])

A = [0] * Q

for i in range(Q):
	A[i] = int(input())

point = [K] * N

for i in range(Q):
	point = [point[i] - 1 for j in range(N)]
	point[A[i]] = point[A[i]] + 1

for i in range(N):
	if point[i] > 0:
		print("Yes")
	else:
		print("No")

### FIXED CODE ###

I = input()
I = I.split(" ")
N = int(I[0])
K = int(I[1])
Q = int(I[2])

A = [0] * Q

for i in range(Q):
	A[i] = int(input())

point = [0] * N

for i in range(Q):
	point[A[i]-1] = point[A[i]-1] + 1

for i in range(N):
	if Q - point[i] < K:
		print("Yes")
	else:
		print("No")
N,M = input().split(" ")
if N > M:
  
    str = str(M)
    print(str*N)

else:
    str = str(N)
    print(str*M)




### FIXED CODE ###

N,M = input().split(" ")
if N > M:
  str = M
  print(str*int(N))
else:
  str = N
  print(str*int(M))
N,A,B=map(int,input.split())
#the max
print(min(A,B))
print(max(0,A+B-N))

### FIXED CODE ###

N,A,B=map(int,input().split())
#the max
print(min(A,B),max(0,A+B-N))
import sys
input = sys.stdin.readline

import sympy

N = int(input())
if N == 1 or N == 2:
    print("0")
    sys.exit()

N_divisors = sympy.divisors(N)

N_length = len(N_divisors)
N_length_half = N_length // 2
N_length_mod = N_length % 2

N_length_half_temp = 0

if N_length_mod == 1:
    N_length_half_temp = N_length_half + 1
else:
    N_length_half_temp = N_length_half

print(N_divisors)
print(sum(N_divisors[N_length_half_temp:]) - (N_length - N_length_half_temp))

### FIXED CODE ###

import sys
input = sys.stdin.readline

import numpy as np

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors

N = int(input())
if N == 1 or N == 2:
    print("0")
else:
    N_divisors = make_divisors(N)

    N_length = len(N_divisors)
    N_length_half = N_length // 2
    N_length_mod = N_length % 2

    N_length_half_temp = 0

    if N_length_mod == 1:
        N_length_half_temp = N_length_half + 1
    else:
        N_length_half_temp = N_length_half
    if N_divisors[N_length_half_temp]-1 == N_divisors[N_length_half_temp-1]:
        N_length_half_temp += 1
    print(sum(N_divisors[N_length_half_temp:]) - (N_length - N_length_half_temp))
import sys

if __name__=='__main__':
  lines = [int(x.strip()) for x in sys.stdin.readlines()]
  n = lines[0]
for i in xrange(n):
  # a, b  = int(lines[i+1]), int(lines[i+2])
  a, b  = lines[2*i+1], lines[2*i+2]
  if len(str(a+b)) > 80:
    print 'overflow'
  else:
    print a+b

### FIXED CODE ###

import sys

if __name__=='__main__':
  lines = [int(x.strip()) for x in sys.stdin.readlines() if x != '' and x != '\n']
  n = lines[0]
for i in xrange(n):
  a, b  = lines[2*i+1], lines[2*i+2]
  if len(str(a+b)) > 80:
    print 'overflow'
  else:
    print a+b
#97b
x = int(input())
array = []
for i in range(1,33):
    for j in range(2,10):
        a = i**j
        if a <= n:
            array.append(a)
array.sort(reverse=True)
print(array[0])


### FIXED CODE ###

#97b
x = int(input())
array = []
for i in range(1,33):
    for j in range(2,10):
        a = i**j
        if a <= x:
            array.append(a)
array.sort(reverse=True)
print(array[0])
a,b= map(int,input().split())
c= a - b*2
if c > 0:
  print(c)
else:
  print 0

### FIXED CODE ###

a,b= map(int,input().split())
c= a - b*2
if c > 0:
    print(c)
else:
    print (0)
a, b = map(int, input().split())

def calc(n):
    if n == 1:
        return 1
    else:
        return calc(n-1) + n

print(calc(b - a) - b)

### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)
a, b = map(int, input().split())

def calc(n):
    if n == 1:
        return 1
    else:
        return calc(n-1) + n

print(calc(b - a) - b)
print(input() // 3)

### FIXED CODE ###

print(int(input()) // 3)
import math
A,B,H,M=map(int,input().split())
c=abs(H*15-M*6)
k=A*A+B*B-2*A*B*math.cos(c)
l=math.sqrt(k)
print(l:df)

### FIXED CODE ###

import math
A,B,H,M=map(int,input().split())
c=abs(H*30-M*5.5)
k=A*A+B*B-2*A*B*math.cos(c*math.pi/180)
l=math.sqrt(k)
print(l)
import itertools

n, m = map(int, input().split())
am = [[False]*m for _ in range(n)]

for _ in range(m):
    a, b = map(int, input().split())
    am[a-1][b-1] = True
    am[b-1][a-1] = True

ans = 0
for p in itertools.permutations(list(range(n)), n):
    if p[0] != 0:
        continue

    isok = True
    for i in range(len(p)-1):
        if not am[p[i]][p[i+1]]:
            isok = False
            break

    if isok:
        ans += 1

print(ans)


### FIXED CODE ###

n, m = map(int, input().split())
g = {}
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    g.setdefault(a, [])
    g[a].append(b)
    g.setdefault(b, [])
    g[b].append(a)

isVisited = [False]*n
isVisited[0] = True

def dfs(v: int) -> int:
    if all(isVisited):
        return 1

    ret = 0

    for i in g[v]:
        if isVisited[i]:
            continue

        isVisited[i] = True
        ret += dfs(i)
        isVisited[i] = False

    return ret

print(dfs(0))
length1, length2, length3 = map(int, input().split())
area = AB * BC / 2
print(int(area))

### FIXED CODE ###

AB, BC, CA = map(int, input().split())
print(int(AB * BC / 2))
import sys
sys.setrecursionlimit(1_000_000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# データ構造：ヒープ
import heapq
class heapque:
    def __init__(self, *args):
        self.que = []
        for arg in args:
            self.push(arg)
    def push(self, v):
        heapq.heappush(self.que, v)
    def pop(self):
        return heapq.heappop(self.que)

from collections import Counter

# エントリーポイント
def main():
    N = input(int)
    A = input([int, N])

    cnt = Counter(A).values()
    # 3以上の奇数を相殺させ1へ
    cnt = [1 if c % 2 else c for c in cnt]
    # 偶数を相殺させ2へ
    cnt = [2 if c % 2 == 0 else c for c in cnt]

    print(len(cnt) - cnt.count(2) % 2)

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]

# データ構造：ヒープ
import heapq
class heapque:
    def __init__(self, *args):
        self.que = []
        for arg in args:
            self.push(arg)
    def push(self, v):
        heapq.heappush(self.que, v)
    def pop(self):
        return heapq.heappop(self.que)

from collections import Counter

# エントリーポイント
def main():
    N = input(int)
    A = input([int, N])

    cnt = Counter(A).values()
    # 3以上の奇数を相殺させ1へ
    cnt = [1 if c % 2 else c for c in cnt]
    # 偶数を相殺させ2へ
    cnt = [2 if c % 2 == 0 else c for c in cnt]

    print(len(cnt) - cnt.count(2) % 2)

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()