uses crt;
var a,b,c:longint;
function ss(a,b,c:longint):boolean;
begin
if (a>=b) and (b>=c) then exit(true);
if (c>=b) and (b>=a) then exit(true);
exit(false);
end;
begin
clrscr;
readln(a,b,c);
if ss(a,b,c)=true then writeln(b)
else if ss(b,a,c)=true then writeln(a)
else writeln(c);
readln;
end.