program reverse;
var s:ansistring;
yes:boolean;
i,l:longint;
begin
assign(input,'reverse.in');
assign(output,'reverse.out');
reset(input);
rewrite(output);
read(s);
yes:=false;
if s[1]='-' then begin
yes:=true;
delete(s,1,1);
end;
l:=length(s);
while s[l]='0' do l:=l-1;
if yes then write('-');
for i:=l downto 1 do write(s[i]);
close(input);
close(output);
end.