var x1,x2,x3,x4:integer;
function max(a,b:integer):integer
begin
if a>b then max:= a
else max:=b;
end;
Begin
read(x1,x2,x3,x4);
x1:=max(x1,x2);
x2:=max(x3,x4);
writeln(x1);
End.
var x1,x2,x3,x4:integer;
function max(a,b:integer):integer
begin
if a>b then max:= a
else max:=b;
end;
Begin
read(x1,x2,x3,x4);
x1:=max(x1,x2);
x2:=max(x3,x4);
x1:=max(x1,x2);
writeln(x1);
End.