Felix6326727/beyond-accuracy-code-comprehension huggingface dataset:
a = int(input())
s = input()

if a >= 3200:
  print(s)
else:
  print("red")

# Example run
# Input:
-29792
VK$.dV
# Output:
red
a = int(input())
s = input()

if a >= 3200:
    print(s)
else:
    print("red")


# Example run
# Input:
1593280440
9,h&KO
# Output:
9,h&KO
N = int(input())
x = input()
if N <3200:
  print("red")
else:
  print(x)

# Example run
# Input:
295
*QR
# Output:
red
first_input = int(input())
second_input = input()

if first_input >= 3200:
    print(second_input)
else:
    print('red')

# Example run
# Input:
-1051
gT#7f%jCl
# Output:
red
a = int(input())
s = input()
if a > 3199: print(s)
else: print('red')

# Example run
# Input:
-1028681
&rMRWHkL
# Output:
red
a = int(input())
b = int(input())
c = list(map(int,input().split()))
sum = 0
for i in c:
  sum = sum + i
count = 0
vote = (1/(4*b))*sum
for j in c:
  if j>=vote:
    count = count + 1
if count>=b:
  print("Yes")
else:
  print("No")

# Example run
# Input:
-24
323
-3
# Output:
No
import random

N=random.randrange(100)
M=random.randrange(100)
Ai=random.randrange(1000)
li=random.sample(list(range(0, Ai)), k=N)
li.sort(reverse=True)
li_sum=sum(li)

Ml=0
for A in li:
    if A < (li_sum/(4*M)):
        break
    else:
        Ml+=1

if M <= Ml:
    print("yes")
else:
    print("no")

# Example run
# Input:
xUX
# Output:
no
N=int(input())
M=int(input())
number=0
for i in range(N):
  v=int(input())
  if v < 1/(4*M):
    number=number
  else:
    number = number+1
if number >= M:
  print("Yes")
else:
  print("No")

# Example run
# Input:
-9
105896
# Output:
No
n=int(input())
a=list(map(int, input().split()))
a.sort()

b=sum(a[n:-n])
c=0
for i in range(n):
	c += a[-2 - 3*i]
print(max(b,c))

# Example run
# Input:
-2059433
402
# Output:
402
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
20558
3420734
# Output:
0
def f(n):
    if n == 1:
        return []
    if n % 2 == 0:
        r = f(n//2)
        k = len(r)
        return r + [k+1]
    if n % 2 == 1:
        r = f(n - 1)
        k = len(r)
        return [k+1] + r

n = int(input())
r = f(n+1)
k = len(r)
res = r + list(range(1, k+1))
print(len(res))
for x in res:
    print(x, end=' ')
print()



# Example run
# Input:
2575588
# Output:
64
32 29 25 23 21 17 15 11 8 6 4 1 2 3 5 7 9 10 12 13 14 16 18 19 20 22 24 26 27 28 30 31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
N=int(input())
print(sum(sorted(map(int,input().split()))[N::2]))


# Example run
# Input:
-21
31499
# Output:
31499
N = int(input())
print(sum(sorted(list(map(int,input().split())))[N:][::2]))

# Example run
# Input:
-4505
0
# Output:
0
N = int(input())
A = list(sorted(list(map(int, input().split()))))
print(A[N] + A[N + 1])

# Example run
# Input:
-1
-221907
# Output:
-443814
n = int(input())
a = sorted(list(map(int, input().split())))
print(sum(a[n:-n]))

# Example run
# Input:
15761764
-37
# Output:
0
N = int(input())
g = list(map(int, input().split()))
g.sort()
print(sum(g[N::2]))

# Example run
# Input:
30456987
645801
# Output:
0
n = int(input())
a = sorted(list(map(int, input().split())))
   
ans = a[-2*n :: 2]
print(sum(ans))

# Example run
# Input:
-41270
-2
# Output:
0
N=int(input())
ai=list(map(int,input().split()))
ai.sort()
ans1=ai[N:]
ans2=ans1[:N]

print(ans1)
print(ans2)

print(sum(ans2))

# Example run
# Input:
679804
0
# Output:
[]
[]
0
n = int(input())
a = list(map(int,input().split()))
a.sort()
print(sum(a[n::2]))    

# Example run
# Input:
242419
-4169
# Output:
0
n = int(input())
print(sum(sorted(list(map(int, input().split())))[n::2]))

# Example run
# Input:
0
-1140169349
# Output:
-1140169349
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
17741045
142
# Output:
0
n=int(input())
a=sorted(list(map(int, input().split())))
print(sum(a[n::2]))

# Example run
# Input:
137752
-5930
# Output:
0
N = int(input())
a = sorted(list(map(int, input().split())))

s = 0
while a:
    x = [a[0]] + a[-2:]
    s += x[1]
    a = a[1:-2]
print(s)

# Example run
# Input:
0
-6956
# Output:
-6956
n=int(input())
a=list(map(int, input().split()))
a.sort()

b=a[n:-n]
print(sum(b))

# Example run
# Input:
-358903
-4422
# Output:
-4422
N = int(input())
A = sorted(list(map(int, input().split())))
print(sum(A[N::2]))


# Example run
# Input:
-5
-64
# Output:
-64
N = int(input())
A = sorted(list(map(int, input().split())))
print(A)
ans = 0
for i in range(2 * N):
    if i % 2 == 1:
        print(3 * N - i - 1)
        ans += A[3 * N - i - 1]

print(ans)

# Example run
# Input:
-68
-31
# Output:
[-31]
0
N = int(input())
a = list(map(int,input().split(" ")))
a.sort()
print(a)
total=0
for i in range(N):
    total+=a[len(a)-i-2]
print(total)


# Example run
# Input:
-147
-3225
# Output:
[-3225]
0
N = int(input())
strengths = map(int, input().split())
sorted_strengths = sorted(strengths, reverse=True)
print(sorted_strengths)
team_strength_sum = 0
for i in range(3*N):
    if ((i+1)%2 == 0) & ((i+1)//2 <= N):
        team_strength_sum += sorted_strengths[i]
print(team_strength_sum)

# Example run
# Input:
-554740
65444
# Output:
[65444]
0
# AGC012A - AtCoder Group Contest
def main():
    n = int(input())
    A = sorted(map(int, input().rstrip().split()))
    print(sum(A[n::2]))


if __name__ == "__main__":
    main()

# Example run
# Input:
-1057486868
10366
# Output:
10366
n=int(input())
print(sum(sorted(map(int,input().split()))[n::2]))

# Example run
# Input:
62363359
475209597
# Output:
0
n = int(input())
elem = list(map(int, input().split()))
elem.sort()
ans = sum(elem[n::2])
print(ans)

# Example run
# Input:
-420
627
# Output:
627
N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for i in range(N):
  ans+=A[N-2-i*2]
print(ans)

# Example run
# Input:
-3
24
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()

s = [ai for ai in a[N::2]]
print(sum(s))

# Example run
# Input:
-37
1
# Output:
1
N = int(input())
a = list(map(int, input().split()))

a.sort()

print(sum(a[N:][0::2]))


# Example run
# Input:
-54634663
3615919
# Output:
3615919
n = int(input())
a = list(map(int, input().split()))
a.sort
print(sum(a[::2]))

# Example run
# Input:
5946
8
# Output:
8
N = int(input())
A = list(map(int, input().split()))
A.sort()

ans = 0
for a in A[N:: 2]:
    ans += a

print(ans)

# Example run
# Input:
-7038374
-6
# Output:
-6
N = int(input())
a = list(map(int,input().split()))

a.sort()

ans = a[N:]
ans = ans[::2]
print(sum(ans))

# Example run
# Input:
0
-54266464
# Output:
-54266464
n = int(input())
a_l = list(map(int, input().split()))
a_l = sorted(a_l)
ans = sum([ a for a in a_l[n::2]])
print(ans)

# Example run
# Input:
981571
-6163826
# Output:
0
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
print(A)
sum=0
for i in range(2*N):
    if i%2==1:
        sum+=A[i]

print(sum)


# Example run
# Input:
-5
-2147483648
# Output:
[-2147483648]
0
def solve(N, As):
    As.sort()
    return sum([n for n in As[N::2]])

if __name__ == "__main__":
    N = int(input())
    As = list(map(int, input().split(" ")))
    print(solve(N, As))


# Example run
# Input:
3
0
# Output:
0
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
-3978447
1
# Output:
1
N = int(input())
strengths = map(int, input().split())
sorted_strengths = sorted(strengths, reverse=True)
print(sorted_strengths)
team_strength_sum = 0
for i in range(3*N - 1):
    if (i+1)%2 == 0:
        team_strength_sum += sorted_strengths[i]
print(team_strength_sum)

# Example run
# Input:
-3636
96193
# Output:
[96193]
0
# https://atcoder.jp/contests/agc012/tasks/agc012_a

N = int(input())
a = list(sorted(map(int, input().split())))
print(sum(a[N::2]))


# Example run
# Input:
-39032
66169
# Output:
66169
n = int(input())

arr = list(map(int, input().split(" ")))
arr.sort()

del arr[-n:]
del arr[:n]

print(sum(arr))

# Example run
# Input:
-887384
13499019
# Output:
13499019
N=int(input())
A=list(map(int,input().split()))
A.sort()
print(sum(A[N::2]))

# Example run
# Input:
-11989124
-407
# Output:
-407
n = int(input())
a = list(map(int,input().split()))
print(sum(sorted(a,reverse=True)[:n*2:2]))

# Example run
# Input:
-887384
13499019
# Output:
0
N = int(input())
A = sorted(
  list(map(int,input().split())) )

print(sum([A[N-i*2-2] for i in range(N) ]))

# Example run
# Input:
-52564348
-7737
# Output:
0
n=int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[n::2]))



# Example run
# Input:
559
31946
# Output:
0
#bin/usr/env python3

N = int(input())
a = input()
x = 0

a = a.split()
a.sort(reverse = True)

z = a[2:3*N+1:-2]

for i in range(len(z)):
	x += int(z[i])
	
print(x)

# Example run
# Input:
14563732
715035410
# Output:
0
n=int(input())
a=sorted(list(map(int,input().split())))
aa=a[n:]
ans=0
for i in range(len(aa)):
 if i%2==0:
  ans+=aa[i]
print(ans)

# Example run
# Input:
4345
-8164991
# Output:
0
n = int(input())
a = list(map(int, input().split()))
a.sort()
for i in range(n):
    a.pop(0)
    a.pop()
print(sum(a))

# Example run
# Input:
-3463607
18
# Output:
18
N = int(input())
a = list(map(int, input().split()))
a.sort()

ans = 0
for i in range(N):
    ans += a[len(a)-2-i*2]
print(ans)

# Example run
# Input:
-1
-422501
# Output:
0
n = int(input())
l = sorted(list(map(int, input().split())))
print(sum(l[n::2]))

# Example run
# Input:
5
9
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()
del a[:N]
print(sum(a[::2]))


# Example run
# Input:
-227170451
13499019
# Output:
13499019
N = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(N, len(a), 2):
    ans += a[i]
print(ans)

# Example run
# Input:
237
-42600
# Output:
0
n=int(input())
*a,=map(int,input().split())
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
1418198351
9
# Output:
0
N = int(input())
A = sorted(list(map(int, input().split())))
print(sum(A[N::2]))

# Example run
# Input:
-2978029
3
# Output:
3
n = int(input())
A = list(map(int,input().split()))
A.sort()
print(sum(A[n:-n]))

# Example run
# Input:
-3753932
42339391
# Output:
42339391
tms=int(input())
strlist=sorted(list(map(int,input().split())))
ans=sum(strlist[tms::][::2])
print(ans)

# Example run
# Input:
47070594
-4941179
# Output:
0
from collections import deque
n = int(input())
A = sorted(list(map(int,input().split())))
d =deque(A)
for _ in range(n):
    d.pop()
    d.popleft()
print(sum(d))

# Example run
# Input:
-4
-1008
# Output:
-1008
N = int(input())
A = list(map(int, input().split()))
A.sort()
print(sum(A[N::2]))


# Example run
# Input:
28016
-48
# Output:
0
def main():
    N = int( input())
    A = list( map( int, input().split()))
    A.sort()
    print( sum(A[N::2]))
if __name__ == '__main__':
    main()


# Example run
# Input:
-1799682701
446
# Output:
446
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
-61684020
84816755
# Output:
84816755
n = int(input())

# ヨコ

# タテ
# m = [int(input()) for _ in range(N)]
a = list(map(int, input().split()))

a.sort()


print(sum(a[::-1][n::2]))

# Example run
# Input:
242208
94838
# Output:
0
N = int(input())
A = sorted(list(map(int, input().split())))

Ans = sum(A[N::2])
print(Ans)


# Example run
# Input:
339175880
510778600
# Output:
0
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
-6815
1044
# Output:
1044
n =int(input())
s = input()
data = []
for it in s.split():
    data.append(int(it))
data.sort()

rest = data[n:]
print(sum(rest[::2]))

# Example run
# Input:
13499019
3132478
# Output:
0
n = int(input())
l = sorted(list(map(int,input().split())))
print(sum(l[n:-n]))

# Example run
# Input:
19276688
0
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()

ans = 0
for i in range(N):
    ans += a[len(a)-2-i]
print(ans)

# Example run
# Input:
-5271130
19
# Output:
0
N = int(input())
a = sorted(list(map(int, input().split())))

total = 0
for i, num in enumerate(a[N:]):
    if i % 2 == 0:
        total += num

print(total)

# Example run
# Input:
49968
20415230
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()

print(sum(a[N::2]))

# Example run
# Input:
13
-123410341
# Output:
0
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
a = a[n:]
print(sum(a[0::2]))

# Example run
# Input:
-24
-35784
# Output:
-35784
N = int(input())
A = list(map(int, input().split()))
A.sort()
print(sum(A[N:2 * N + 1]))

# Example run
# Input:
-18103719
55
# Output:
0
N = int(input())
A = list(map(int,input().split()))
A.sort()
A = A[N:]
B = A[::2]
print(sum(B))

# Example run
# Input:
45580
-2147483648
# Output:
0
N = int(input())
a = sorted(list(map(int,input().split())))
del a[:N]

b = [a[i] for i in range(len(a)) if i%2 == 0]

print(sum(b))


# Example run
# Input:
505288784
57712056
# Output:
0
N=int(input())
a=sorted(map(int,input().split()))
print(*a)
ans=0
left=0;right=3*N-1
for i in range(N):
    print(left,right)
    mid=right-1
    ans+=a[mid]
    right=mid-1
    left+=1
print(ans)

# Example run
# Input:
-3108573
51
# Output:
51
0
N = int(input())
A = list(map(int,input().split()))
A.sort()
print(sum(A[N::2]))

# Example run
# Input:
-24
-35784
# Output:
-35784
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(sum(a[n::2]))

# Example run
# Input:
212
-11989124
# Output:
0
N = int(input())
inputs = [int(i) for i in input().split()]

inputs.sort()

print(sum(inputs[N::2]))

# Example run
# Input:
-185
-2938
# Output:
-2938
N = int(input())
a_list = list(map(int,input().split()))

a_list.sort(reverse=True)
print(a_list)

sum = 0
for i in range(N, 2*N, 1):
    sum += a_list[i]

print(sum)

# Example run
# Input:
-1
-3439167
# Output:
[-3439167]
0
n = int(input())
li = list(map(int, input().split()))

li.sort()
v = sum(li[n::2])
print(v)

# Example run
# Input:
0
-31
# Output:
-31
n = int(input())
a = sorted(list(map(int, input().split())))
print(sum(a[n::2]))


# Example run
# Input:
22710854
-2147483648
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[N::2]))

# Example run
# Input:
-331748
14563732
# Output:
14563732
n = int(input())
a = list(map(int, input().split()))

a = sorted(a)
a = a[n:]

print(sum(a[0::2]))


# Example run
# Input:
1
61070189
# Output:
0
if __name__ == '__main__':
    n = int(input())
    alist = [int(i) for i in input().split()]
    alist.sort(reverse=True)
    print(alist)
    st = 0
    for i in range(n):
        st += alist[2*i+1]
    print(st)


# Example run
# Input:
-110923
13499019
# Output:
[13499019]
0
n = int(input())
a = list(map(int, input().split()))

a.sort()
a = a[n:]
ans = 0
for i, ai in enumerate(a):
    if i % 2 == 0:
        ans += ai

print(ans)

# Example run
# Input:
-7737
-126905272
# Output:
-126905272
N = int(input())
l = input().split()
l.sort()
l = map(int, l)
l = list(l)
S = 0
for i in range(N):
    S += l[N + 2 * i]
print(l)
print(S) 

# Example run
# Input:
-746
-63
# Output:
[-63]
0
n = int(input())
a = list(map(int,input().split()))
a.sort()
ans = 0
for i in range(n, len(a), 2):
    ans += a[i]
print(ans)


# Example run
# Input:
37967
54504816
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()
x = sum(a[N::2])
print(x)


# Example run
# Input:
-147
-3225
# Output:
-3225
n = int(input())
a_list = list(map(int, input().split()))
a_list.sort()

for i in range(n):
    a_list.pop()
    a_list.pop(0)

print(sum(a_list))

# Example run
# Input:
-11157473
-1
# Output:
-1
tms=int(input())

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

strong_list.sort()

ans=sum(strong_list[tms::][::2])
print(ans)


# Example run
# Input:
-10
453
# Output:
453
N = int(input())
a = sorted(list(map(int,input().split())))

print(sum([a[2*i-1] for i in range(N)]))

# Example run
# Input:
-694262
479
# Output:
0
N = int(input())
a = list(map(int,input().split()))

A = sorted(a, reverse=True)
B = []
ans = 0
B = A[:2*N]
for i in range(int(len(B)/2)):
    ans += B[2*i+1]

print(B)
print(int(len(B)/2))
print(ans)

# Example run
# Input:
-210
49968
# Output:
[]
0
0
N = int(input())
P = list(map(int, input().split()))

P.sort()
P2 = P[N:]

print(str(sum(P2[::2])))

# Example run
# Input:
-50723
-456
# Output:
-456
n=int(input())
a=list(map(int,input().split()))
from collections import Counter
c=Counter(a)
ans,nokori=0,0
c=sorted(c.items(),reverse=True)
for k,v in c:
  cnt=min((v+nokori)//2,n)
  n-=cnt
  ans+=int(k)*cnt
  nokori=(v+nokori)%2
print(ans)

# Example run
# Input:
1973033
-264371717
# Output:
0
n = int(input())
aa = list(map(int, input().split()))
xx = sorted(aa)[n::2]
# print(xx)
print(sum(xx))

# Example run
# Input:
246
-1614289
# Output:
0
N = int(input())
A = sorted(list(map(int, input().split())))

ret = 0
for i in range(N):
    ret += A[3 * N - (i + 1 * 2) - 1]
print(ret)

# Example run
# Input:
1
9
# Output:
9
N = int(input())
a = sorted(list(map(int, input().split())))
print(sum(a[N:-N]))


# Example run
# Input:
986892
57712056
# Output:
0
n = int(input())
print(sum(sorted(list(map(int, input().split())))[n::2]))

# Example run
# Input:
-5056872
2072477
# Output:
2072477
N = int(input())
a = list(map(int,input().split(" ")))
a.sort()
total=0
for i in range(N):
    total+=a[len(a)-i-2]
print(total)


# Example run
# Input:
-7038374
-6
# Output:
0
n = int(input())
a = list(map(int, input().split()))
a = a[:n+1]
a.sort()
ans = 0
for i in range(n*2):
  if (i)%2 == 0:
    ans += a[i]
print(ans)

# Example run
# Input:
0
90
# Output:
0
N=int(input())
*A, = map(int,input().split())
print(sum(sorted(A)[N::2]))

# Example run
# Input:
-1002
45236
# Output:
45236
n  = int(input())
li = list(map(int,input().split()))
li.sort()
new_li = li[n:]
#print(new_li)
all_sum = 0
for i,n in enumerate(new_li):
    if i%2 == 0:
        all_sum += n
print(all_sum)

# Example run
# Input:
4753830
13557
# Output:
0
"""AtCoder Grand Contest 012
A - AtCoder Group Contest"""


def main():
    n = int(input())
    inp = list(sorted(map(int, input().split())))
    print(sum(inp[len(inp) - 2 * x - 2] for x in range(n)))


if __name__ == "__main__":
    main()


# Example run
# Input:
-101281970
-210
# Output:
0
N = int(input())
a = list(map(int,input().split()))
a.sort()
b = a[N:]
print(sum(b[::2]))

# Example run
# Input:
-7737
-126905272
# Output:
-126905272
N = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
print(sum(a[N - 1:2 * N:2]))

# Example run
# Input:
-2147483648
450137
# Output:
0
N = int(input())
a = list(map(int, input().split()))
a.sort()
#print(a)
# @0~N-1, !N,N+1,!N+2,N+3,!N+4, ... ,!N+N=2N
a = a[N::2]
print(sum(a))

# Example run
# Input:
597537
158
# Output:
0
#整数の入力
N = int(input())

#スペース区切りの整数の入力リスト
A_list = list(map(int, input().split()))

A_list = list(reversed(sorted(A_list)))
print(A_list)



ans  = 0
for i in range(1,2*N,2):
  #print(i)
  #print(A_list[i])
  ans = ans + A_list[i]
print(ans)

# Example run
# Input:
-117864
-38181262
# Output:
[-38181262]
0
n = int(input())

# ヨコ

# タテ
# m = [int(input()) for _ in range(N)]
a = list(map(int, input().split()))

a.sort()


print(sum(a[::-1][n-1::2]))

# Example run
# Input:
-473
-7
# Output:
-7
n = int(input())
a = sorted(list(map(int,input().split())))
sum_a = 0
for i in range(n):
    sum_a += a[len(a)//2+i]
print(sum_a)

# Example run
# Input:
-7737
-126905272
# Output:
0
n = int(input())
a = [int(i) for i in range(3*n)]

ans = 0
for i in range(3*n):
  if i >= n and (i-n) % 2 == 0:
    ans += a[i]
print(ans)

# Example run
# Input:
0
# Output:
0
n = int(input())
a = list(map(lambda x: int(x), input().split(' ')))

a.sort()
for i in range(n):
    a.pop()
a.reverse()
for i in range(n):
    a.pop()

print(sum(a))


# Example run
# Input:
-131787924
-1
# Output:
-1
N = int(input())
A = sorted(list(map(int, input().split())))[N:]
print(A)
ans = 0
for i in range(2 * N):
    if i % N == 0:
        ans += A[i]

print(ans)

# Example run
# Input:
0
-7617381
# Output:
[-7617381]
0
n = int(input())
a = [int(x) for x in input().split()]
a.sort()
ans = sum(a[n::2])
print(ans)

# Example run
# Input:
-2239572
-31
# Output:
-31
n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = sum(a[n:][0::2])
print(ans)


# Example run
# Input:
51856
15
# Output:
0
n=int(input())
A=list(map(int,input().split()))
A.sort()
print(sum(A[n::2]))

# Example run
# Input:
936150587
-24756136
# Output:
0
N = int(input())
A = list(map(int, input().split()))

A.sort()
print(sum(A[N::2]))

# Example run
# Input:
30315
-65
# Output:
0
N = int(input())
participants = sorted([ int(v) for v in input().split(" ") ])

# 1 2 4 5 5 5 7 8 9 
# 1 2 5 5 5 8

sum = 0
i = 0
for p in participants[N:]:
  sum += p
  i += 1
  if i == N:
    break
  #print(v[i])

print(sum)


# Example run
# Input:
1041204430
105477721
# Output:
0
n = int(input())
a = list(map(int, input().split()))
a.sort()
a.reverse()
ans = 0
print(a)
for i in a[1:-n:2]:
    ans += i
print(ans)


# Example run
# Input:
-62950208
1892351448
# Output:
[1892351448]
0
N=int(input())
print(sum(sorted(list(map(int,input().split(' '))))[N::2]))


# Example run
# Input:
-7
17
# Output:
17
N = int(input())

A = list(map(int, input().split()))
A = sorted(A)

ans = sum(A[N::2])
print(ans)


# Example run
# Input:
0
-7617381
# Output:
-7617381
N = int(input())
a = sorted([int(i) for i in input().rstrip().split(' ')])
print(sum(a[N::2]))

# Example run
# Input:
1813543
-252699780
# Output:
0
n = int(input())
xs = [int(c) for c in input().strip().split()]

ans = 0
for i in range(n):
  ans += xs[2 * i - 1]
print(ans)

# Example run
# Input:
-2552
-330190783
# Output:
0
n = int(input())
num_list = sorted([ int(v) for v in input().split() ])
print(sum(num_list[n:][::2]))

# Example run
# Input:
4887419
815520
# Output:
0
n=int(input())
l=sorted(list(map(int,input().split())),reverse=0)
print(sum(l[n::2]))

# Example run
# Input:
21643
-887384
# Output:
0
n = int(input())
a = sorted(map(int, input().split()))

print(sum(a[n:3*n+1:2]))

# Example run
# Input:
13499019
3132478
# Output:
0
N = int(input())
A = list(map(int, input().split()))

A.sort()
print(sum(A[N:-N]))

# Example run
# Input:
-1
-1406309
# Output:
-1406309
# For taking integer inputs.
def inp():
    return(int(input()))


# For taking List inputs.
def inlist():
    return(list(map(int, input().split())))


# For taking string inputs. Actually it returns a List of Characters, instead of a string, which is easier to use in Python, because in Python, Strings are Immutable.
def instr():
    s = input()
    return(list(s[:len(s)]))


# For taking space seperated integer variable inputs.
def invr():
    return(map(int, input().split()))


N = inp()

a = inlist()
a = sorted(a)
a = a[:(2*N)]
res = sum(a[-N:])
print(res)


# Example run
# Input:
0
5568815
# Output:
0
N=int(input())
A=list(map(int,input().split()))
B=sorted(A)
ans=0
for i in range(N):
  ans+=B[N+2*i]
print(B)
print(ans)

# Example run
# Input:
0
-2
# Output:
[-2]
0
n=int(input())
print(sum(sorted(map(int,input().split()))[n::2]))


# Example run
# Input:
11109145
0
# Output:
0
n = int(input())
li_a = list(map(int, input().split()))

print(sum(sorted(li_a)[n::2]))


# Example run
# Input:
13499019
3132478
# Output:
0
n=int(input())
a=list(map(int,input().split()))
a.sort()
for i in range(n):
    del a[i],a[-i]
print(sum(a))

# Example run
# Input:
-831
110
# Output:
110
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
print(sum(a[n::2]))


# Example run
# Input:
-61094699
2147483647
# Output:
2147483647
N = int(input())
list_a  = list(map(int, input().split()))

list_a.sort()
print(sum(list_a[N::2]))

# Example run
# Input:
-87
141725276
# Output:
141725276
n = int(input())
l = sorted(list(map(int,input().split())))
print(sum(l[n::2]))

# Example run
# Input:
6118
-7930
# Output:
0
def main():
    N=int(input())
    a=sorted([int(_) for _ in input().split()])
    print(sum(a[N:-N]))

main()

# Example run
# Input:
-8116
-1243251189
# Output:
-1243251189
n = int(input())
arr = list(map(int, input().split(" ")))
arr.sort()
# print(arr)

new_arr = arr[n::2]
print(sum(new_arr))

# Example run
# Input:
-65
0
# Output:
0
n=int(input())
a=sorted(map(int,input().split()))
print(sum(a[n::2]))

# Example run
# Input:
49394697
14755112
# Output:
0