Problem:
 Score : 200 points    Problem Statement Snuke is having a barbeque party.  At the party, he will make N servings of Skewer Meal .    Example of a serving of Skewer Meal   He has a stock of 2N skewers, all of which will be used in Skewer Meal. The length of the i -th skewer is L_i .
Also, he has an infinite supply of ingredients.  To make a serving of Skewer Meal, he picks 2 skewers and threads ingredients onto those skewers.
Let the length of the shorter skewer be x , then the serving can hold the maximum of x ingredients.  What is the maximum total number of ingredients that his N servings of Skewer Meal can hold, if he uses the skewers optimally?      Constraints  1≦N≦100  1≦L_i≦100  For each i , L_i is an integer.         Input The input is given from Standard Input in the following format:  N  L_1  L_2  ...  L_{2N}       Output Print the maximum total number of ingredients that Snuke's N servings of Skewer Meal can hold.        Sample Input 1 2
1 3 1 2      Sample Output 1 3  If he makes a serving using the first and third skewers, and another using the second and fourth skewers, each serving will hold 1 and 2 ingredients, for the total of 3 .       Sample Input 2 5
100 1 2 3 14 15 58 58 58 29      Sample Output 2 135

Solution (Python):
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from decimal import *
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
INF = float('inf') 
def gcd(a,b):return fractions.gcd(a,b) 
def lcm(a,b):return (a*b) // fractions.gcd(a,b) 
def iin(): return int(sys.stdin.readline()) 
def ifn(): return float(sys.stdin.readline()) 
def isn(): return sys.stdin.readline().split() 
def imn(): return map(int, sys.stdin.readline().split()) 
def imnn(): return map(lambda x:int(x)-1, sys.stdin.readline().split()) 
def fmn(): return map(float, sys.stdin.readline().split()) 
def iln(): return list(map(int, sys.stdin.readline().split())) 
def iln_s(): return sorted(iln()) 
def iln_r(): return sorted(iln(), reverse=True) 
def fln(): return list(map(float, sys.stdin.readline().split())) 
def join(l, s=''): return s.join(l) 
def perm(l, n): return itertools.permutations(l, n) 
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) 
def comb(l, n): return itertools.combinations(l, n) 
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) 
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 
def m_add(a,b): return (a+b) % MOD
def print_list(l): print(*l, sep='\n')
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def No(): print('No')

def sieves_of_e(n):
    is_prime = [True] * (n+1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i * 2, n+1, i): is_prime[j] = False
    return is_prime

N = iin()
L = sorted(iln())

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

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for i in range(N*2):
    if i % 2 == 0:
        ans += L[i]
print(ans)

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort()
res = 0
for i in range(n*2):
    if i%2==0:
        res += l[i]
print(res)

Solution (Python):
n = int(input())
L = list(map(int, input().split()))

L = sorted(L)

print(sum(L[::2]))

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)

ans = 0
for i in range(0, 2 * N, 2):
    ans += min(L[i], L[i + 1])

print(ans)

Solution (Python):
def main():
    n = int(input())
    l = list(map(int, input().split()))
    l.sort()
    ans = sum(l[::2])
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
X = sorted(list(map(int, input().split())))
s = 0
for i in range(N):
    s += X[2*i]
print(s)

Solution (Python):
n = int(input())
l = sorted(list(map(int, input().split())))
ans = 0

for i in range(n):
    ans += l[i*2]

print(ans)

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

Solution (Python):
n=int(input())
l=list(map(int,input().split()))

l.sort()
print(sum(l[::2]))

Solution (Python):
n = int(input())
li = [int(x) for x in input().split()]
li.sort()
ans = 0
for i in range(0,2*n,2):
    ans += min(li[i],li[i+1])
print(ans)

Solution (Python):
N = int(input())
l = [0] * 2 * N
l = list(map(int, input().split()))
l.sort()
total = 0
for i in range(N):
  total += l[i * 2]
print(total)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint
def ceil(a,b): return (a+b-1)//b
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    L=LI()
    L.sort()
    ans = 0
    for i in range(N):
        ans += L[2*i]
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
def examA():
    N = I()
    L = LI()
    L.sort()
    ans = sum(L[::2])
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = 10**(-12)
alphabet = [chr(ord('a') + i) for i in range(26)]

sys.setrecursionlimit(10**6)

if __name__ == '__main__':
    examA()

"""

"""

Solution (Python):
def main():
    N = int(input())
    L = [int(i) for i in input().split()]
    L.sort()
    print(sum(L[::2]))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(N):
    ans += L[i*2]
print(ans)

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]
L.sort()

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

print(ans)

Solution (Python):

import sys

def INT(): return int(input())
def MAP(): return map(int,input().split())
def LI(): return list(map(int,input().split()))

def main():
    N = INT()
    L = LI()
    L.sort()
    answer = 0
    for i in range(N):
        answer += min(L[2*i],L[2*i+1])

    print(answer)
    return

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

l.sort()
ans = sum(l[::2])
print(ans)

Solution (Python):

 
import math
import itertools
import sys
import copy

 







N = int(input())
L = list(map(int, input().split()))

L.sort()
ans = 0
for i in range(0, N*2, 2) :
  ans += L[i]
  
print (ans)

Solution (Python):
N = int(input())
L_li = list(map(int, input().split()))
L_li.sort()
ans = 0
for i in range(0, 2 * N, 2):
    ans += L_li[i]
print(ans)

Solution (Python):
def main():
    n = int(input())
    l = list(map(int, input().split()))
    l.sort(reverse=True)
    ans = 0
    for i in range(1, 2*n, 2):
        ans += l[i]
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
N,*L=map(int, open(0).read().split())
L=sorted(L)
print(sum(map(min, L[::2], L[1::2])))

Solution (Python):
N = int(input())
L = input().split(" ")
for i in range(0, len(L)):
  L[i] = int(L[i])
L.sort()

ans = 0
for i in range(0, len(L), 2):
  tmp = L[i]
  if tmp > L[i+1]:
    tmp = L[i+1]
  ans += tmp
print(ans)

Solution (Python):
n = int(input())
l = sorted(map(int,input().split()))
print(sum(l[::2]))

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
ans = 0
for i in range(0,2*n,2):
    ans += l[i]
print(ans)

Solution (Python):
n = int(input())
l = sorted(list(map(int, input().split())))
ans = 0
for i in range(0,n*2,2):
  ans += min(l[i],l[i+1])
print(ans)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
ans = 0
L.sort()
L.reverse()
for i in range(N):
  ans += min(L[2*i],L[2*i+1])
print(ans)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

L.sort()

ans = 0
for i in range(2*N):
    if i % 2 == 0:
        
        ans += L[i]

print(ans)

Solution (Python):
from sys import stdin
point = 0
n = int(stdin.readline().rstrip())
li = list(map(int,stdin.readline().rstrip().split()))
li.sort()
for i in range(n):
    point += min(li[2*i],li[2*i+1])
print(point)

Solution (Python):
n = int(input())
li_l = list(map(int, input().split()))

print(sum(sorted(li_l, reverse=True)[1::2]))

Solution (Python):
N = int(input())
Llist = sorted(list(map(int, input().split())))[::-1]
ans = 0
for i in range(0, 2*N, 2):
    ans += min(Llist[i], Llist[i+1])
print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))

L.sort()
c=0
for i in range(N):
    c=c+min(L[2*i],L[2*i+1])
print(c)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
for i in range(n):
    ans+=l[2*i]
print(ans)

Solution (Python):
N = int(input())
L = sorted(list(map(int,input().split())))
print(sum(i for i in L[::2]))

Solution (Python):


N = int(input())
L = sorted(map(int, input().split()))

print(sum(min(L[2*i], L[2*i+1]) for i in range(N)))

Solution (Python):
n = int(input())
ls = list(map(int, input().split()))

ls.sort(reverse=True)

ans = 0

for i in range(n):
    ans += ls[2 * i + 1]

print(ans)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()
ans = 0
for i in range(N):
  ans += L[2 * i]
print(ans)

Solution (Python):
def main():
    N = int(input())
    L = sorted(list(map(int,input().split())))
    LL = [L[i] for i in range(2*N) if i%2 == 0]
    print(sum(LL))

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
x=input().split()
l=[]
for k in range(2*n):
  l.append(int(x[k]))
l.sort()
s=0
for k in range(2*n):
  if k%2==0:
    s+=l[k]
print(s)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a.sort()
res = 0
for i in range(0, 2*n, 2):
  res += min(a[i], a[i+1])

print(res)

Solution (Python):
try:
  N = int(input())
  a = map(int, input().split())
  a_ = sorted(a, reverse=True)
  b = []
  for i in range(len(a_)):
      if i%2!=0:
          b.append(a_[i])
  print(sum(b))
except EOFError:
  pass

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L = sorted(L)
sum_L = 0

for i in range(0, 2*N, 2):
    sum_L += L[i]
print(sum_L)

Solution (Python):
n = int(input())
l = [int(_) for _ in input().split()]
l.sort()
ans = 0
for i in range(0, 2*n-1, 2):
    ans += min(l[i], l[i+1])
print(ans)

Solution (Python):
def solve(n, L):
    L.sort()
    return sum(min(L[2 * i], L[2 * i + 1]) for i in range(n))

_n = int(input())
_L = list(map(int, input().split()))
print(solve(_n, _L))

Solution (Python):
import sys
input = sys.stdin.buffer.readline

def main():
    N = int(input())
    A = list(map(int,input().split()))
    
    A.sort()
    ans = 0
    for i in range(N):
        ans += A[2*i]
        
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
li = list(map(int, input().split()))
li.sort()
P = 0
for i in range(N):
  P += li[i*2]
print(P)

Solution (Python):
input()
print(sum(sorted(map(int, input().split()))[::2]))

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort()

a = []

for i in range(2*n):
    if i % 2 == 0:
        a.append(l[i])


print(sum(a))

Solution (Python):
n = int(input())

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

ll = sorted(ll)

ans = 0
for i in range(n):
    ans += ll[2*i]

print(ans)

Solution (Python):
n = int(input())
x = sorted(list(map(int, input().split())))

ans = 0
for i in range(0, 2*n, 2):
    ans += x[i]
print(ans)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()

ans = 0
for i in range(N):
  ans += L[2*i]

print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans = 0
for i in range(2*n):
  if i%2==0:
    ans += a[i]
print(ans)

Solution (Python):
def main(n: int, l: list):
    ans = 0

    l.sort(reverse=True)

    for _ in range(n):
        a, b = l.pop(), l.pop()
        ans += a

    print(ans)


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

    main(n, l)

Solution (Python):
n=int(input())
a=[int(x) for x in input().split()]
a.sort()
ss=0
for i in range(0,len(a),2):
    ss+=min(a[i:i+2])
print(ss)

Solution (Python):
a = int(input())
s = input().split()
d = []
m = 0
for i in s:
    d.append(int(i))
while d != []:
    d.remove(max(d))
    m += max(d)
    d.remove(max(d))
print(m)

Solution (Python):
n = int(input())
li = list(map(int, input().split()))

li.sort()
li1 = []

for i in range(2*n):
    if i%2==0:
        li1.append(li[i])
print(sum(li1))

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()

ans = 0
for i in range(2*N):
  if i % 2 == 0:
    ans += L[i]
print (ans)

Solution (Python):


N = int(input())
L = sorted(list(map(int, input().split())))

ans = 0
for i in range(N):
    ans += min(L[2 * i], L[2 * i + 1])

print(ans)

Solution (Python):
N = int(input())
A = sorted([int(a) for a in input().split()])
print(sum(A[::2]))

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10


def solve():
    n = II()
    l = LI()
    l.sort()
    print(sum(l[::2]))
    return



if __name__ == '__main__':
    solve()

Solution (Python):
n = int(input())
l = list(map(int,input().split()))

l.sort()
ans = 0
for i in range(2*n):
    if i%2 == 0:
        ans += l[i]

print(ans)

Solution (Python):
tc = int(input())
arr = list(map(int, input().split()))
arr.sort()
ans = 0
for i in arr[::2]:
    ans += i
print(ans)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
count=0

for i in range(0,2*n,2):
    count+=l[i]
print(count)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
i = 0
while i <= n * 2 - 1:
    ans += min(l[i], l[i+1])
    i += 2
print(ans)

Solution (Python):
n  = int(input())
l = [int(x) for x in input().split()]
l.sort()
print(sum(l[::2]))

Solution (Python):
input()
A=list(map(int,input().split()))
A.sort()
r = 0
for i in range(0,len(A),2):
  r+=A[i]
  
print(r)

Solution (Python):

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

Solution (Python):


n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(n):
    ans+=min(l[2*i],l[2*i+1])
print(ans)

Solution (Python):


n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(n):
    ans+=min(l[2*i],l[2*i+1])
print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
L=sorted(L)
ans=0
for l in L[0::2]:
  ans+=l
print(ans)

Solution (Python):
n=int(input())
l=sorted(list(map(int,input().split())))
ans=0
for i in range(0,2*n,2):
  ans+=l[i]
print(ans)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N,*L = map(int,read().split())

L.sort()
answer = sum(L[::2])
print(answer)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
A.sort()
print(sum(A[2*i] for i in range(N)))

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = sum(l[0::2])
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

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

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(0, 2 * n, 2):
    ans += l[i]
print(ans)

Solution (Python):

N = int(input())
L = list(map(int, input().split(' ')))
L.sort()

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

Solution (Python):
n=int(input())
l=sorted(map(int,input().split()))
print(sum(l[::2]))

Solution (Python):
import sys
import os
if sys.platform=="darwin":
	base = os.path.dirname(os.path.abspath(__file__))
	name = os.path.normpath(os.path.join(base, '../Documents/input.txt'))
	
	sys.stdin = open(name)

n = int(input())
l = list(map(int,input().split()))

l = sorted(l)


print( sum(l[::2]) )

Solution (Python):
N = int(input())
L = [int(i) for i in input().split()]

L.sort()
print(sum(L[0::2]))

Solution (Python):
n=int(input())
li=[int(i) for i in input().split()]

li=sorted(li)
ans=0
for i in range(n):
	ans+=li[i*2]
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
a.sort()
print(sum(a[::2]))

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)

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

Solution (Python):
N = int(input())
L = sorted(list(map(int, input().split())))

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

print(ans)

Solution (Python):
N = int(input())
print(sum(l for l in sorted(list(map(int,input().split())),reverse=True)[1::2]))

Solution (Python):
n = int(input())
l = [int(i) for i in input().split()]
l.sort()
ans = 0
for i in range(0,2*n,2):
    ans += l[i]
print(ans)

Solution (Python):
n=int(input())
l=sorted([int(i) for i in input().split()])
c=0
for i in range(n):
    c+=l[2*i]
print(c)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()
Sum = 0
for i in range(0,N*2,2):
  Sum += L[i]
print(Sum)

Solution (Python):
n = int(input())
L = list(map(int,input().split()))
L.sort(reverse = True)

cnt = 0
for i in range(n):
    cnt += min(L[2*i],L[2*i+1])

print(cnt)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))

a.sort()

ans = 0
for i in range(n):
    ans += a[i*2]

print(ans)

Solution (Python):
n = int(input())
L = sorted(list(map(int, input().split())))
print(sum(L[::2]))

Solution (Python):

def main():
    n = int(input())
    l = sorted(map(int, input().split()))
    print(sum(l[::2]))


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
L=sorted(list(map(int,input().split())))
ans=0
for i in range(0,n*2,2):
  ans+=L[i]
print(ans)

Solution (Python):
N = int(input())
x = list(map(int,input().split()))

x = sorted(x,reverse = True)

ans = 0
for i in range(len(x)):
  if i % 2 == 0:
    ans += min(x[i],x[i+1])

print(ans)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))

L.sort()

ans = 0

for i in range(N):
    ans += L[i*2]
    
print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int, L: "List[int]"):
    L.sort()
    print(sum([L[i] for i in range(2*N) if i%2 == 0]))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    L = [int(next(tokens)) for _ in range(2 * N)]  
    solve(N, L)

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=sorted(list(map(int,input().split())),reverse=True)
ans=0
c=0
for i in range(0,len(a),2):
    if c>n:
        break
    
    ans+=min(a[i],a[i+1])
    c+=1
print(ans)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(0,len(l)-1):
    if i%2==0:
        ans+=min(l[i],l[i+1])

print(ans)

Solution (Python):

n = int(input())
l = [int(s) for s in input().split()]

l.sort()
total_number = 0

for i in range(0, n * 2, 2):
    total_number += l[i]

print(total_number)

Solution (Python):
n=int(input())
l=sorted(list(map(int,input().split())),reverse=True)
cnt=0
for i in range(0,2*n,2):
    cnt+=l[i+1]
print(cnt)

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

Solution (Python):
N = int(raw_input())
L = sorted(map(int, raw_input().strip().split()), reverse=True)
print sum(L[1::2])

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans =0
for i in range(n):
    ans+=l[i*2]
print(ans)

Solution (Python):
import sys

if __name__ == "__main__":
    N = sys.stdin.readline()
    L_list = list(map(int, sys.stdin.readline().split()))
    L_list.sort()
    total_bbq = sum(L_list[::2])
    print(total_bbq)

Solution (Python):
n = int(input())
l = sorted(list(map(int, input().split())))
cnt = 0
for i in range(n):
    cnt += l[i*2]
print(cnt)

Solution (Python):


import sys

kusi = int(input())
kusi_len = input().rstrip().split(" ")
cnt = 0
ans = 0
for line in sorted(kusi_len, key=int):
  cnt += 1
  if cnt == 1:
    a = int(line)
  elif cnt == 2:
    b = int(line)
    if a <= b:
      ans = ans + a
    else:
      ans = ans + b
    cnt = 0
print(ans)

Solution (Python):


import sys

kusi = int(input())
kusi_len = input().rstrip().split(" ")
cnt = 0
ans = 0
for line in sorted(kusi_len, key=int):
  cnt += 1
  if cnt == 1:
    a = int(line)
  elif cnt == 2:
    b = int(line)
    if a <= b:
      ans = ans + a
    else:
      ans = ans + b
    cnt = 0
print(ans)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
l.sort()
ans = 0
for i in range(n):
  ans += l[2*i]
print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
L.sort()
s=0
for i in range(N):
  s+=L[2*i]
print(s)

Solution (Python):
n = int(input())
li =  sorted(list(map(int,input().split())))

k=0
count =0
for i in range(n):
    count += li[k]
    k += 2

print(count)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
L.sort()
s=0
for i in range(N):
  s+=L[2*i]
print(s)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()

answer = 0

for i in range(N):
    answer += L[2*i]

print(answer)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

L.sort()
print(sum(L[0::2]))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

a.sort()

ans = 0
for i in range(0,2*n,2):
    ans += a[i]
    
print(ans)

Solution (Python):
N = int(input())
L = list(map(int, input().split()))

L.sort()
print(sum(L[::2]))

Solution (Python):
n = int(input())
l = sorted([int(i) for i in input().split()])

l2 = [min(l[i],l[i-1]) for i in range(1,2*n,2)]

print(sum(l2))

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort()

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

Solution (Python):
n = int(input())
L = sorted([int(i) for i in input().split()])
count = 0
for i in range(n):
    count += L[i*2]
print(count)

Solution (Python):
n = int(input())
L = list(map(int,input().split()))
L.sort()
print(sum([L[i] for i in range(0, 2*n, 2)]))

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = [j for i,j in enumerate(l) if i%2 == 0]
print(sum(ans))

Solution (Python):



import sys


input = sys.stdin.readline


def main():
    N = int(input())
    L = [int(i) for i in input().split()]
    L.sort()
    print(sum(L[::2]))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)

ans = 0
for i in range(0, 2 * N, 2):
    ans += min(L[i], L[i + 1])

print(ans)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
for _ in range(n):
  ans+=l[2*_]
print(ans)

Solution (Python):
import heapq
n = int(input())
src = list(map(int, input().split()))
sorted_src = sorted(src)
heapq.heapify(sorted_src)
count = 0
for i in range(n):
    a = heapq.heappop(sorted_src)
    heapq.heappop(sorted_src)
    count += a
print(count)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
L.sort()
ans=0
for i in range(N):
    ans+=min(L[2*i],L[2*i+1])
print(ans)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    l = list(map(int, input().rstrip('\n').split()))
    l.sort()
    cnt = 0
    for i in range(0, n * 2, 2):
        cnt += min(l[i], l[i+1])
    print(cnt)


if __name__ == '__main__':
    slove()

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=0
for i in range(n):
    ans+=l[i*2]
print(ans)

Solution (Python):
def solve(n, l):
    return sum(sorted(l)[::2])

n = int(input())
l = list(map(int, input().split()))
print(solve(n, l))

Solution (Python):


n = input()
l = sorted(list(map(int, input().split())))
i = 0
sum = 0
while (i < len(l) - 1):
  sum += l[i]
  i += 2
print(sum)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
count=0
for i in range(n):
  count+=l[-i*2-2]
print(count)

Solution (Python):
import heapq

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

heapq.heapify(L)

sum = 0

for i in range(N):
    k1 = heapq.heappop(L)
    k2 = heapq.heappop(L)
    sum += k1

print(sum)

Solution (Python):
n=int(input())
L=list(map(int,input().split()))
L.sort()
ans=0
for i in range(0,2*n,2):
  ans+=min(L[i], L[i+1])
print(ans)

Solution (Python):
n=int(input())
L=list(map(int,input().split()))

L.sort()
ans=0
for i in range(0,2*n,2):
  ans+=min(L[i],L[i+1])
print(ans)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort()
ans = 0
for i in range(0,2*N,2) :
    ans += L[i]
print(ans)

Solution (Python):
n = int(input())
l = [int(_) for _ in input().split()]
l.sort()
m = l[::2]
print(sum(m))

Solution (Python):
from collections import Counter,defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
a = inpl()
a.sort()
res = 0
for i in range(2*n)[::2]:
    res += a[i]
print(res)

Solution (Python):
a = int(input())
x = sorted(list(map(int,input().split())))
cnt=0
for i in range(a):
  cnt += x[2*i]
print(cnt)

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 0
for i in range(0,2*n,2):
    ans += l[i]
print(ans)

Solution (Python):
N = int(input())
list = list(map(int, input().split()))
list.sort(reverse = True)

result = 0
for i in range(N):
    result += min(list[2 * i], list[2 * i + 1])

print(result)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))
L.sort(reverse=True)


cnt = 0
for l in L[1::2]:
    
    cnt += l

print(cnt)

Solution (Python):
input()
print(sum(sorted(map(int, input().split()))[::2]))

Solution (Python):
n = int(input())
l = tuple(sorted(map(int, input().split())))

print(sum(l[::2]))

Solution (Python):
N=int(input())
A=[int(x) for x in input().split()]
A.sort()
print(sum([A[i] for i in range(len(A)) if i%2==0]))

Solution (Python):

def main():
    N, *L = map(int, open(0).read().split())
    L.sort()
    ans = sum(L[::2])
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
l = list(map(int, input().split()))

l.sort()

print(sum(l[::2]))

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
l.sort()
count=0
for i in range(0,2*n,2):
    count=count+min(l[i],l[i+1])
print(count)

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
a.sort()
print(sum([a[i] for i in range(0,2*n,2)]))

Solution (Python):
n = int(input())
L = [int(i) for i in input().split()]

L.sort()
ans = 0
for i in range(0, 2*n, 2):
    ans += min(L[i], L[i+1])

print(ans)

Solution (Python):
N = int(input())
Ls = list(map(int, input().split()))
Ls.sort()
r = sum(Ls[0::2])
print(r)

Solution (Python):
n = int(input())
li = list(map(int, input().split()))

l = sorted(li)
lis = []
for i in range(2*n):
    if (i%2 == 0):
        lis.append(l[i])

a = sum(lis)
print(a)

Solution (Python):
N,*L=map(int,open(0).read().split());L.sort();print(sum(min(a,b)for a,b in zip(L[::2],L[1::2])))

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7



N = int(sys.stdin.readline())
L = list(map(int, sys.stdin.readline().split()))

L .sort()

a = sum(L[::2])
print(a)

Solution (Python):
"

N = int(input())
L = list(map(int,input().split()))

L = sorted(L)

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

print(ans)

Solution (Python):
"

N = int(input())
L = list(map(int,input().split()))

L = sorted(L)

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

print(ans)

Solution (Python):
"

N = int(input())
L = list(map(int,input().split()))

L = sorted(L)

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

print(ans)

Solution (Python):
"

N = int(input())
L = list(map(int,input().split()))

L = sorted(L)

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

print(ans)

Solution (Python):
N = int(input())
L = list(map(int,input().split()))

L = sorted(L)

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

print(ans)