Uses crt;
var sump,sumn,i:integer;
a:array[1..3] of integer;
begin
for i:=1 to 3 do
begin
read(a[i]);
if a[i]>=0 then
sump:=sump+a[i]
else
sumn:=sumn+a[i];
end;
if sump>=sumn then
writeln(min(min(a[1],a[2]),min(a[2],a[3])))
else
writeln(max(max(a[1],a[2]),max(a[2],a[3])));
end.