import sys

input = sys.stdin.readline



N = int(eval(input()))

A = [int(x) for x in input().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()

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

print(answer)
import sys

input = sys.stdin.readline
N = int(eval(input()))
A = [int(x) for x in input().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()
answer = sum(A[N::2])
print(answer)

-input = sys.stdin.readline -N = int(eval(input())) -A = [int(x) for x in input().split()] +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readlines = sys.stdin.buffer.readlines +N, *A = list(map(int, read().split()))