l = list(map(int,input().split()))
ans = []
for i in range(2) :
    for j in range(i+1,3) :
        ans.append(l[i]+l[j])
print(min(ans)) l = list(map(int,input().split())) l list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans = [] ans [] for i in range(2) :
    for j in range(i+1,3) :
        ans.append(l[i]+l[j]) i range(2) range 2 for j in range(i+1,3) :
        ans.append(l[i]+l[j]) j range(i+1,3) range i+1 i 1 3 ans.append(l[i]+l[j]) ans.append ans append l[i]+l[j] l[i] l i l[j] l j print(min(ans)) print min(ans) min ans ans = [] [] ans l = list(map(int,input().split())) list(map(int,input().split())) l
l = list(map(int,input().split()))
ans = []
for i in range(2) :
    for j in range(i+1,3) :
        ans.append(l[i]+l[j])
print(min(ans))
