Program prx;
uses crt;
Var a,d,c,k,d,g,o,f,v.perimetr1,perimetr2,perimetr3,max:byte;
Begin
Writeln ("Введи длины сторон трех треугольников");
Readln (a,d,c,k,d,g,o,f,v);
Perimetr1:=a+d+c;
Perimetr2:=k+d+g;
Perimetr3:=o+f+v;
If perimetr1>perimetr2
Then max:=perimetr1
Else if perimetr2>perimetr3
Then max:=perimetr2
Else max:=perimetr3
End;
End;
Writeln (max);
Readln;
End.