import itertools
l=list(map(int,input().split()))
L=[]
p=itertools.permutations(l,2)
for a,b in p:
  L.append(a+b)
print(min(L)) import itertools itertools l=list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split L=[] L [] p=itertools.permutations(l,2) p itertools.permutations(l,2) itertools.permutations itertools permutations l 2 for a,b in p:
  L.append(a+b) a b p L.append(a+b) L.append L append a+b a b print(min(L)) print min(L) min L L=[] [] L l=list(map(int,input().split())) list(map(int,input().split())) l p=itertools.permutations(l,2) itertools.permutations(l,2) p
import itertools
l=list(map(int,input().split()))
L=[]
p=itertools.permutations(l,2)
for a,b in p:
  L.append(a+b)
print(min(L))