x,y,z=map(int,input().split())
xx=x+y
yy=y+z
zz=z+x
print(min(zz,xx,yy)) x,y,z=map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y z xx=x+y xx x+y x y yy=y+z yy y+z y z zz=z+x zz z+x z x print(min(zz,xx,yy)) print min(zz,xx,yy) min zz xx yy x,y,z=map(int,input().split()) map(int,input().split()) x y,z=map(int,input().split()) map(int,input().split()) y zz=z+x z+x zz z=map(int,input().split()) map(int,input().split()) z xx=x+y x+y xx yy=y+z y+z yy
x,y,z=map(int,input().split())
xx=x+y
yy=y+z
zz=z+x
print(min(zz,xx,yy))