import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



N,*A = list(map(int,read().split()))



A.sort()

answer = sum(A[N::2])

print(answer)
import sys



read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines



N, *A = list(map(int, read().split()))

A.sort()

x = sum(A[N::2])

print(x)
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, *A = list(map(int, read().split()))
A.sort()
answer = sum(A[N::2])
print(answer)

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N, *A = list(map(int, read().split()))
A.sort()
x = sum(A[N::2])
print(x)

-answer = sum(A[N::2]) -print(answer) +x = sum(A[N::2]) +print(x)