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):
n = int(input()); a = list(map(int, input().split()))
a.sort(); b = 0
for i in range(n): b += a[2*i]
print(b)

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

Solution (Python):
print(sum(sorted(map(int,open(0).read().split()[1:]))[::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()))
answer = 0
l = sorted(l)
for i in range(0,2*n,2):
  answer +=l[i]
print(answer)

Solution (Python):
import sys
def input():
  return sys.stdin.readline().rstrip()

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):
n = int(input())
l = [int(s) for s in input().split()]
l.sort()
ans = 0
for i in range(0, n * 2, 2):
    ans += min(l[i], l[i + 1])

print(ans)

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

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

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

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

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

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

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

Solution (Python):
n = int(input())
num = [int(i) for i in input().split(' ')]
num.sort(reverse=True)
m=0
for i in range(1,n+1):
    m+=num[2*i-1]
print(m)

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

L.sort()

ans = 0
for x in L[::2]:
  ans += x

print(ans)

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


main()

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

Solution (Python):
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=sorted(l)
print(sum([l[2*i] for i in range(n)]))

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

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

Solution (Python):
k = int(input())
li= list(map(int, input().split()))
li.sort()
sum=0
for k in range(len(li)):
  
  if k%2==0:
   
    sum=sum+li[k]
 
print(sum)

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()
print(sum(L[::2]))

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

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):
N = int(input().strip())
L = list(map(int, input().strip().split()))

L.sort()
amt = 0
while (len(L) > 0):
	(L1, L2) = L[0:2]
	amt += min([L1, L2])
	del L[0:2]

print(amt)

Solution (Python):
n = int(input())
l = list(map(int,input().split()))
l.sort(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(0,len(l),2):
    ans+=l[i]
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


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

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

    print(ans)


if __name__ == "__main__":
    main()

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(list(map(int,input().split())))
ans=0
for i in range(n):
  ans+=l[(i+1)*2-2]
print(ans)

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

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

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

arr.sort()

res = 0
i=0
l = len(arr)
while i<l:
  res+=min(arr[i], arr[i+1])
  i+=2
  
print(res)

Solution (Python):
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)

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

Solution (Python):
import numpy as np
n = int(input())
L = [int(s) for s in input().split()]


npL = np.array(L)

npL = np.sort(npL)
npLd = np.reshape(npL, (-1, 2))

cnt = 0
for i in npLd:
    cnt += i[0]
print(cnt)

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n = int(readline())
    l = list(map(int, readline().split()))
    l.sort()

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
N=int(input())
inp=input()
L=[int(val) for val in inp.split()]
L=sorted(L,reverse=True)
total=0
start=0
for _ in range(N):
  total+=min(L[start],L[start+1])
  start+=2
print(total)

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(reverse=True)
ans=0
for i in range(1,2*n,2):
    ans+=l[i]
print(ans)

Solution (Python):
n = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
ans = 0
for i, l in enumerate(L):
    if i%2 == 1:
        ans += l
print(ans)

Solution (Python):
n = int(input())
L = list(map(int, input().split()))
L.sort(reverse=True)
ans = 0
for i, l in enumerate(L):
    if i%2 == 1:
        ans += l
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 = list(map(int, input().split()))
ans = 0

L = sorted(L)

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

print(ans)

Solution (Python):
n = int(input())
l = input().split()
int_l = []

for i in range(2*n):
	int_l.append(int(l[i]))

int_l.sort(reverse=True)

sum = 0

for i in range(n):
	sum += min(int_l[2*i],int_l[2*i+1])

print(sum)

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

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

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
l = list(map(int, input().split()))
l.sort()
if len(l)%2==1:
    l = l[1:]
ans = 0
ans = sum(l[::2])
print(ans)

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

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

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()))
ans = 0
l.sort()
for i in range(n):
    ans += l[0]
    l = l[2:]
print(ans)

Solution (Python):
num = int(input())
num *= 2
Skewers = list(map(int, input().split()))
 
Skewers.sort()
val = 0
for i in range(0, num-1, 2):
  val += min(Skewers[i], Skewers[i + 1])
  
  
print(val)

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

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

Solution (Python):
n = int(input())
n *= 2
skewers = list(map(int, input().split()))

skewers.sort()
eats = 0
for i in range(0, n-1, 2):
  eats += min(skewers[i], skewers[i + 1])
  
  
print(eats)

Solution (Python):

from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

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

if __name__ == "__main__":
    main()

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


for i in range(len(l)):
    if i % 2 == 0:
        sum += l[i]
print(sum)

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

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

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

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

def skews(n,li):
    
    li = sorted(li)
    li = [l for i,l in enumerate(li) if i%2==0] 
    return sum(li)


print(skews(n,li))

Solution (Python):

def solution(n, skewers):
  sorted_s = sorted(skewers)
  answer = 0
  for i in range(0, 2*n, 2):
    smaller = min(sorted_s[i],sorted_s[i+1])
    answer += smaller
  return answer

n = int(input())
skewers = [int(x) for x in input().split()]
print(solution(n, skewers))

Solution (Python):
def resolve():
    N = int(input())
    L = list(reversed(sorted([int(i) for i in input().split()])))
    sumA = 0
    for l in L[1::2]:
        sumA += l
    print(sumA)


resolve()

Solution (Python):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

L = np.array(read().split(), np.int32)[1:]

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

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

Solution (Python):
def pair(n,count):
    l=[];su=0
    for i in range(0,len(n),2):
        sub=list()
        sub.append(n[i:i+2])
        su=su+sub[0][0]
        l.append(sub)
    return(su)
        
def ip11(): return int(input())
def ip22(): return [int(_) for _ in input().split()]
        

def main():
    ip1=ip11()
    ip2=ip22()
    ip2.sort()
    print(pair(ip2,ip1))
    return
if __name__ == '__main__':
    main()

Solution (Python):
N=int(input()) 
L = sorted([int(i) for i in input().split()], key=lambda x: x)

foodCount = 0
for i in range(0,len(L), 2):
   foodCount += min(L[i], L[i+1])

print(foodCount)

Solution (Python):


import numpy as np

def main(p1,p2):
    L_np = np.sort(np.array(p2))
    x_total = 0
    for i in range(p1):
        x_total += L_np[2*i]
    print(x_total)

if __name__ == "__main__":
    
    N = int(input())
    L = [int(item) for item in input().split()]
    main(N,L)

Solution (Python):
if __name__ == '__main__':
    n =int(input())
    a = [int(i) for i in input().split()]
    a.sort()
    count =0

    for i in range(n):
        count+=min(a[i*2],a[i*2+1])
    print(count)

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()
c = 0
for i in range(n):
  c += l[2*i]
print(c)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *

N = INT()
L = LIST()

L.sort()

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

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

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

print(count)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count




N = I()
L = IL()
L.sort()
print(sum(L[::2]))

Solution (Python):

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

l.sort()
ans = 0
for i in range(n) :
  ans += min(l[i*2], l[i*2+1])
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[i*2],l[i*2+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):
n=int(input())
l=list(map(int,input().split()))
l.sort(reverse=True)
ans=0
for i in range(n):
    ans+=l[i*2+1]
print(ans)

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

n=int(input())
vA=list(map(int,input().split()))
vA.sort()
res=sum(a for a in vA[::2])

print(res)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())
    L = [int(x) for x in input().split()]

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

    print(ans)




if __name__ == '__main__':
    main()

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

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

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

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

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

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

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


max_idx = sample.index(max(sample))
sample.sort()
ans = 0
for i in range(len(sample)//2):
    ans += int(sample[i*2])
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 += l[2*i+1]
print(ans)

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

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

L.sort()

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

print(count)

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

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

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

li.sort()

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

Solution (Python):

n = int(input())
l_list = list(map(int, input().split()))
counter = 0
for i in range(2 * n):
    if i % 2 == 0:
        counter += sorted(l_list)[i]
print(counter)

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

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

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

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

Solution (Python):
n = int(input())
skewers = list(map(int,input().split()))
s = sorted(skewers)
ans = sum([val for i,val in enumerate(s) if i % 2 == 0])
print(ans)

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

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()
ans = sum([l[i] for i in range(2 * n) if i % 2 == 0])
print(ans)

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

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

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

Solution (Python):
import sys

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


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

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


if __name__ == '__main__':
    resolve()

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    import math
    

    
    

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

if __name__ == '__main__':
    main()

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:
        continue
    ans +=l[i]

print(ans)

Solution (Python):
N = input()
Ls = map(int,raw_input().split(" "))

Ls.sort()
print sum(Ls[i] for i in range(0,N*2,2))

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

ans = 0
for i in range(len(l)):
    if i % 2 == 0:
        ans += l[i]
print(ans)

Solution (Python):
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)

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

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(0,2*n,2):
    ans+=l[i]
print(ans)

Solution (Python):
import sys 
input=sys.stdin.readline 
def main():
    n=int(input())
    L=list(map(int,input().split()))
    L.sort() 
    ans=0
    for i in range(n):
        ans+=L[i*2]
    else:
        print(ans)

if __name__=="__main__":
    main()

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):
A = int(input())
B = list(map(int,input().split()))
B.sort(reverse=True)
ans =0
for i in range(A):
    ans += min(B[0+i*2],B[1+i*2])
print(ans)

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

L = sorted(L, reverse=True)

cnt = 0
i = 0
while True:
	if i == 2*n:
		break
	cnt += min(L[i], L[i + 1])
	i += 2

print(cnt)

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    L = sorted(readInts())
    ans = 0
    for i in range(0,n*2,2):
        ans += L[i]
    print(ans)
if __name__ == '__main__':
  main()

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

L.sort(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(0, 2 * N, 2):
    ans += l[i]

print(ans)

Solution (Python):
from statistics import median


from fractions import gcd
from itertools import combinations 
from collections import deque
from collections import defaultdict
import bisect










import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input()) * 2
    L = readInts()
    L = sorted(L)
    res = 0
    for i in range(0,n,2):
        res += L[i]
    print(res)
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 += min(l[2*i],l[2*i+1])
print(ans)

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

Solution (Python):
N = int(input())
L = [int(x) for x in input().split()]
L.sort(reverse=True)
print(sum(L[1::2]))

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

Solution (Python):

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

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

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
L.sort()
ans=int(0)
for i in range(0,N*2,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,2*N,2):
  ans+=L[i]
print(ans)

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

Solution (Python):
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 = [int(i) for i in input().split()]
l.sort()

ans = 0
for i in range(1, len(l), 2):
  ans += min(l[i-1], l[i])

print(ans)

Solution (Python):
import sys

kushiYaki = int(input())

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

kushi.sort()

max_ingredients = 0

for available_ingredient in kushi[0::2]:
    max_ingredients += available_ingredient

print(max_ingredients)

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

ans = sum(L[::2])

print(ans)

Solution (Python):
n, *l = map(int, open(0).read().split())
print(sum(min(sorted(l)[i*2:i*2+2]) for i in range(n)))

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
asrt = sorted(a,reverse=True)
ans = 0
for v in range(1,2*n,2):
    ans += asrt[v]
print(str(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(list(map(int,input().split())))
ans=0
for i in range(n):
    ans+=L[2*i]
print(ans)

Solution (Python):

def main():
    n = int(input())

    arr = [int(x) for x in input().split(" ")]

    arr.sort()

    ans = 0

    for i in range(2*n):

        if (i % 2) == 0:
            ans += arr[i]

    print(ans)

main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
L = LIST()

L.sort()

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

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

print(skewers)

Solution (Python):
N = int(input())
A = sorted(map(int,input().split()),reverse=True)
C = []
for i in range(N):
  C.append(A[2*i + 1])
print(sum(C))

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

L.sort()

ans=sum(L[0:2*N:2])
print(ans)

Solution (Python):
n = int(input())
l = sorted(list(map(int, input().split())))
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(0,2*n,2):
  s+=min(l[i],l[i+1])
print(s)

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(0,2*n, 2):
  s+=min(l[i], l[i+1]) 
print(s)

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

Solution (Python):
n = int(input())
l = list(map(int, input().split() ))
l.sort()
count = 0
i = 0
while i<len(l):
	count+=l[i]
	i+=2
print(count)