a = list(map(int,input().split()))
min = 100000

for i in range(3):
  if min > (a[i%3] + a[(i+1)%3]):
    min = a[i%3] + a[(i+1)%3]
    
print(min) a = list(map(int,input().split())) a list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split min = 100000 min 100000 for i in range(3):
  if min > (a[i%3] + a[(i+1)%3]):
    min = a[i%3] + a[(i+1)%3]
     i range(3) range 3 if min > (a[i%3] + a[(i+1)%3]):
    min = a[i%3] + a[(i+1)%3]
     min > (a[i%3] + a[(i+1)%3]) min a[i%3] + a[(i+1)%3] a[i%3] a i%3 i 3 a[(i+1)%3] a (i+1)%3 i+1 i 1 3 min = a[i%3] + a[(i+1)%3] min a[i%3] + a[(i+1)%3] a[i%3] a i%3 i 3 a[(i+1)%3] a (i+1)%3 i+1 i 1 3 print(min) print min a = list(map(int,input().split())) list(map(int,input().split())) a min = 100000 100000 min min = a[i%3] + a[(i+1)%3] a[i%3] + a[(i+1)%3] min
a = list(map(int,input().split()))
min = 100000

for i in range(3):
  if min > (a[i%3] + a[(i+1)%3]):
    min = a[i%3] + a[(i+1)%3]
    
print(min)