program grg;
var x: integer;
begin
readln(x);
if (x div 10) > (x mod 10) then
x := (x div 10) + (x mod 10);
writeln(x)
end
else writeln((x div 10), (x mod 10)*2);
end.
program grg;
var x: integer;
begin
readln(x);
if (x div 10) > (x mod 10) then
begin
x := (x div 10) + (x mod 10);
writeln(x)
end
else writeln((x div 10), (x mod 10)*2);
end.