Felix6326727/beyond-accuracy-code-comprehension huggingface dataset:
n = int(input())
a = list(map(int,input().split()))
a.sort()
print(sum(a[n::2]))

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

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


# Example run
# Input:
-23
38379
# Output:
38379
N = int(input())
As = list(map(int, input().split()))

As.sort()

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


# Example run
# Input:
709214891
-887384
# Output:
0
N = int(input())

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

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


# Example run
# Input:
0
11
# Output:
11
N = int(input())
INT_LIST_SORETED = sorted([int(s) for s in input().split()])
SECOND_INT_LIST_MAX = [val for idx, val in enumerate(INT_LIST_SORETED)
                       if idx >= N and idx % 2 == 0]
print(sum(SECOND_INT_LIST_MAX))


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

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

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

# Example run
# Input:
1940
150088694
# Output:
0
N = int(input())
A = list(map(int, input().split()))
A.sort()

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


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

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

# Example run
# Input:
-19602406
1
# Output:
1
N=int(input())
a_list=list(map(int,input().split()))
a_list=sorted(a_list)[::-1]
power=[]
print(a_list)
for i in range(N):
    power.append(a_list[2*i+1])
print(sum(power))

# Example run
# Input:
0
15473
# Output:
[15473]
0
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    A = sorted(list(map(int, input().split())))

    res = 0
    for i in range(n):
        res += A[len(A) // 2 - 1 + i]

    print(res)


if __name__ == '__main__':
    resolve()


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

# Example run
# Input:
-38175
4743227
# Output:
4743227
n = int(input())
a = sorted(list(map(int,input().split())))
sum_a = 0
for i in range(n):
    sum_a += a[i*2-1]
print(sum_a)

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

a.sort(reverse=True)

print(sum(a[n:2*n]),a)

# Example run
# Input:
0
331737
# Output:
0 [331737]
n = int(input())
a = list(sorted(list(map(int,input().split()))))
print(a[n]+a[n+1])

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

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


if __name__ == "__main__":
    main()

# Example run
# Input:
-19
-13
# Output:
-13
N = int(input())
print(sum(sorted(int(x) for x in input().split())[N::2]))


# Example run
# Input:
1
-124978655
# Output:
0
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[1 + 3*i]
print(max(b,c))

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

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

# Example run
# Input:
996
1
# Output:
0
from collections import deque

n = int(input())
a = [int(i) for i in input().split()]
a.sort()
a = deque(a)
for i in range(0,2*n):
    a.popleft()
ans=0
for i in a:
    ans += i
print(ans)


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

a.sort()

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

print(sum(a))    
    

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

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

# Example run
# Input:
-795212538
36241
# Output:
36241
n = int(input())
xs = [int(c) for c in input().strip().split()]
xs.sort(reverse=True)
ans = 0
for i in range(n):
  ans += xs[2 * i - 1]
print(ans)

# Example run
# Input:
-28080
-507526654
# Output:
0
N=int(input())
a_list=list(map(int,input().split()))
a_list=sorted(a_list)[::-1]
power=[]
print(a_list)
for i in range(N):
    power.append(a_list[2*i+1])
print(sum(power))
    

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

a.sort()
del a[:n]
print(sum(a[0::2]))



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

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

# Example run
# Input:
-15824
-16
# Output:
-16
# https://atcoder.jp/contests/agc012/tasks/agc012_a

n = int(input())
nums = [int(i) for i in input().split()]
nums.sort()
nums = nums[n:]

ans = 0
for i in range(0, len(nums), 2):
    ans += nums[i]
print(ans)

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

# Example run
# Input:
3280
32
# Output:
0
n = int(input())
li =  sorted(list(map(int,input().split())) , reverse=True)
print(li)
count = 0
k = 1
for i in range(n):
    count += li[k]
    k += 2

print(count)


# Example run
# Input:
-14
0
# Output:
[0]
0
n = int(input())
a = list(map(int, input().split()))
a = sorted(a)
print(a)
i = 0
ans = 0
j = 3 * n - 2
while i < n:
    ans += a[j]
    i += 1
    j -= 2

print(ans)

# Example run
# Input:
-15015728
42339391
# Output:
[42339391]
0
N = input()
alist = list(map(int, input().split()))
alist.sort(reverse=True)
print(sum(alist[::2]))


# Example run
# Input:
e3zvshd]
45580
# Output:
45580
# -*- coding: utf-8 -*-


#----------
n = int(input().strip())
a_list = list(map(int, input().rstrip().split()))
#----------
a_list.sort()
a2_list = a_list[n:]

sum=0
for i in range( 0,len(a2_list),2 ):
    sum += a2_list[i]

print(sum)


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

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

# Example run
# Input:
-559351
-11
# Output:
-11
N = input()
alist = list(map(int, input().split()))
alist.sort(reverse=True)
print(alist[::2])


# Example run
# Input:
dH|a#?
224
# Output:
[224]
n = int(input())
a = list(map(int, input().split()))
a.sort()
print(sum(a[n:-n]))


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

# Example run
# Input:
-1
-26132901
# Output:
-52265802
n = int(input())
a_li = list(map(int,input().split()))
a_li.sort()
print(a_li[3*n-1-2]+a_li[3*n-1-3])

# Example run
# Input:
1
51426
# Output:
102852
n = int(input())
a = list(map(int, input().split()))

a.sort()
print(sum(a[n::2]))

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


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

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

# Example run
# Input:
-114
-473
# Output:
-473
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
arr = arr[n:]
arr2 = [arr[i] for i in range(len(arr)) if i % 2 == 0]
ans = sum(arr2)
print(ans)

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

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

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

# Example run
# Input:
-241292
-2147483648
# Output:
0
N=int(input())
*A,=map(int,input().split())

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

# Example run
# Input:
640595
5713
# Output:
0
N = int(input())
participants = sorted([ int(v) for v in input().split(" ") ], reverse=True)

# 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:
-15915
-501843
# Output:
-501843
N = int(input())
A = list(map(int,input().split()))

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

# Example run
# Input:
-62
-112
# Output:
-112
n = int(input())
a = list(sorted(list(map(int,input().split())))[::-1])
ans = 0
print(a)
for i in range(n):
  ans += a[n+i]
print(ans)

# Example run
# Input:
-3249
901872
# Output:
[901872]
0
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = i()
a = l()
a.sort()
A = len(a)
for i in range(A-N,N,-1):
    ans += a[i-1]

print(ans)


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

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

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


# Example run
# Input:
33
-53354
# Output:
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*n:2]))

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

a = sorted(a)

for i in range(2*n):
  if i % 2 == 0:
    a.pop()
  else:
    a.pop(0)

print(sum(a))

# Example run
# Input:
-4782
15867
# Output:
15867
N = int(input())

a_list = map(int, input().split())
a_list = sorted(a_list)

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

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

# Example run
# Input:
730190
-6
# Output:
0
num = 3 * int(input())
target = [int(n) for n in input().split(" ")]
target.sort()
third = num // 3
answer = 0
print(target)
for i in range(third):
    answer += target[i + third]
print(answer)

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

# Example run
# Input:
230
1745
# Output:
0
N = int(input())
a = input().split()
a_i = [int(s) for s in a]
a_i.sort()
print(a_i)
result = 0
for i in range(N,N + N):
    result += int(a_i[i])
print(result)

# Example run
# Input:
-1965718821
-1
# Output:
[-1]
0
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

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

print(ans)


# Example run
# Input:
-196
3
# Output:
3
# AGC 012 A - AtCoder Group Contest
n = int(input())
a = list(map(int, input().split()))

from collections import deque
a.sort()
a = deque(a)
for i in range(n):
    a.pop()
    a.popleft()
    
print(sum(a))

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


# Example run
# Input:
-63
-213058
# Output:
-213058
n = int(input())
nums = list(map(int,input().split()))
nums.sort()

ans = 0
p = 0
i = len(nums) -2

while p < n:
    ans += nums[i]
    i -= 2
    p += 1
print(ans)

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


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

# Example run
# Input:
-11989124
-407
# Output:
-407
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb

# slist = "abcdefghijklmnopqrstuvwxyz"
N = int(input())
arrA = list(map(int,input().split()))

arrA.sort()
A = arrA[N:]
# print(A)
ans = sum(A[::2])

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))


# Example run
# Input:
104248
-291704
# Output:
0
N = int(input())

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

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

print(res)

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

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

# Example run
# Input:
-114
-473
# Output:
-473
N = int(input())
member = sorted(map(int, input().split()))
ans = sum(member[N::2])
print(ans)


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

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

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

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

# Example run
# Input:
-69520
-73864104
# Output:
-73864104
from collections import deque


def main():
    N = int(input())
    a = list(map(int, input().split()))

    a.sort()
    adq = deque()

    for aa in a:
        adq.append(aa)

    for i in range(N):
        adq.pop()
        adq.popleft()

    print(sum(adq))


if __name__ == "__main__":
    main()


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


# Example run
# Input:
-2147483648
450137
# Output:
[450137]
0
n = int(input())
a_list = list(map(int, input().split()))
a_list.sort()

ans = sum(a_list[n:-n])

print(ans)


# Example run
# Input:
4345
-8164991
# Output:
0
N=int(input())
a=sorted([int(i) for i in input().split()])

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



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

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

cnt = 0
a.sort(reverse=True)
print(a)

for i in range(1, 2*N, 2):
    cnt += a[i]

print(cnt)

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

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

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

# Example run
# Input:
-75
57223618
# Output:
0
n = int(input())
a_list = list(map(int, input().split()))
a_list.sort()
except_weak = a_list[n:]

ans = sum(except_weak[::2])
print(ans)


# Example run
# Input:
-15
332
# Output:
332
N = int(input())
a = sorted(map(int, input().split()))
total = 0
for i in range(N):
    total += a[len(a) // 2 - N + i + 1]
print(total)

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

# Example run
# Input:
178
637
# Output:
0
n = int(input())
a = [int(i) for i in range(3*n)]
a.sort()
ans = 0
for i in range(3*n):
  if i >= n and (i-n) % 2 == 0:
    ans += a[i]
print(ans)

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

# Example run
# Input:
10040638
128410
# Output:
0
#
# agc012 a
#

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2
5 2 8 5 1 5"""
        output = """10"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000"""
        output = """10000000000"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    a = list(map(int, input().split()))
    a.sort()
    for i in range(N):
        a.pop()
        a.pop(0)
    print(sum(a))


if __name__ == "__main__":
    # unittest.main()
    resolve()


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


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

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

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

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

a.sort()
print(sum(a[n::2]))

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

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

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

print(sum(a[n:2*n]))

# Example run
# Input:
-640183291
155287
# Output:
[155287]
0
from collections import deque

if __name__ == "__main__":
    n = int(input())
    a = list(map(int, input().split()))

    a.sort()
    deq = deque(a)
    for i in range(n):
        deq.pop()
        deq.popleft()

    ans = 0
    for d in deq:
        ans += d

    print(ans)


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

a.sort()

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


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

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


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

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


# Example run
# Input:
0
1418198351
# Output:
1418198351
N = int(input())
a = input().split()
a_i = [int(s) for s in a]
a_i.sort()
print(a_i)
result = 0
for i in range(N,N + N):
    result += int(a[i])
print(result)

# Example run
# Input:
-224484380
171476207
# Output:
[171476207]
0
n = int(input())
a = [int(i) for i in input().split()]

a.sort()
ans=0
for i in a[n::2]:
    ans+=i
print(ans)


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

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

# ans = 0
# for i in range(N, 3 * N, 2):
#     ans += a[i]

# print (ans)

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

# Example run
# Input:
601
-331
# Output:
0
#bin/usr/env python3

N = int(input())
a = input()
x = 0
b = []

a = a.split()
for i in a:
	b.append(int(i))
print(b)
b.sort()
for i in range(N):
	x += int(b[2*(i+1)+1])
print(x)

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

a.sort(reverse=True)

ans = sum(a[n:len(a) - n])
print(ans)

# Example run
# Input:
-29588
-5
# Output:
-5
N = int(input())
As = list(map(int, input().split()))
As.sort()
r = sum(As[N::2])
print(r)


# Example run
# Input:
14319043
15927431
# Output:
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)%3 == 1:
        team_strength_sum += sorted_strengths[i]
print(team_strength_sum)

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

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

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

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

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

# Example run
# Input:
-405
936
# Output:
936
n = int(input())
a = list(map(int,input().split()))
a.sort()
maxsum = 0
for i in range(1,n+1):
  maxsum += a[len(a)-2*i]
print(maxsum)

# Example run
# Input:
-3123902
-39597485
# Output:
0
n = int(input())
array = list(map(int, input().split()))

array = sorted(array, reverse=True)
s = n
e = 2 * n
print(sum(array[int(s)::2]))

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


# Example run
# Input:
-330190783
-84564737
# Output:
-84564737
n = int(input())
a_inputs = sorted([int(i) for i in input().split()])

k_num = len(a_inputs)
#弱い順にソート,最初のk人を一番弱いメンバーとする。
#残りを(k+1,k+2),(k+3,k+4),...(n-1,n)と並べた時のk+1,k+3...n-1の値値を求める

print(sum([a_inputs[i] for i in range(n,k_num,2)]))

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

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

# Example run
# Input:
-81521
1267176863
# Output:
1267176863