N = int(eval(input()))

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

A.sort()

A = A[N:]

ans = 0

for i in range(N):

    ans += A[2*i]

print(ans)
import sys



def solve():

    input = sys.stdin.readline

    N = int(eval(input()))

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

    A.sort(reverse = True)

    ans = 0

    for i in range(N):

        ans += A[2 * i + 1]

    print(ans)

    return 0



if __name__ == "__main__":

    solve()
N = int(eval(input()))
A = [int(a) for a in input().split()]
A.sort()
A = A[N:]
ans = 0
for i in range(N):
    ans += A[2 * i]
print(ans)

import sys


def solve():
    input = sys.stdin.readline
    N = int(eval(input()))
    A = [int(a) for a in input().split()]
    A.sort(reverse=True)
    ans = 0
    for i in range(N):
        ans += A[2 * i + 1]
    print(ans)
    return 0


if __name__ == "__main__":
    solve()

-N = int(eval(input())) -A = [int(a) for a in input().split()] -A.sort() -A = A[N:] -ans = 0 -for i in range(N): -    ans += A[2 * i] -print(ans) +import sys + + +def solve(): +    input = sys.stdin.readline +    N = int(eval(input())) +    A = [int(a) for a in input().split()] +    A.sort(reverse=True) +    ans = 0 +    for i in range(N): +        ans += A[2 * i + 1] +    print(ans) +    return 0 + + +if __name__ == "__main__": +    solve()