var
z,x,y,r:real;
function max(x,y : real) : real;
begin
if (x > y) then max := x
else max := y;
end;
begin
writeln('Vvedite X');
readln(x);
writeln('Vvedite Y');
readln(y);
writeln('Vvedite Z');
readln(z);
if (x>y)
then
R:=max(max(x+y,z),y+z) else R:=x+y+z;
writeln('R=',R);
end.