var
n,i,j,l,zui:longint;
s:ansistring;
begin
assign(input,'reverse.in');
reset(input);
assign(output,'reverse.out');
rewrite(output);
readln(s);
if s[1]='-' then
write('-');
if s= '0' then
begin
writeln(0);
close(input);
close(output);
halt;
end;
l:=length(s);
for i:=l downto 1 do
begin
if s[i]<>'0' then
break;
end;
zui:=i;
for i:=zui downto 2 do
write(s[i]);
if (s[1]<>'-') and (s[1]<>'0')then
writeln(s[1]);
close(input);
close(output);
end.