program p1928;
var st:string;
a:array[1..20] of integer;
i,n,l:integer;
begin
assign(input,'recerse.in');reset(input);
assign(output,'recerse.out');rewrite(output);
n:=0;
readln(st);
if st[1]='-' then begin write('-'); delete(st,1,1); end;
l:=length(st);
while (st[l]=' ') or (st[l]='0') do
begin
delete(st,l,1);
l:=length(st);
end;
for i:=l downto 1 do write(st[i]);
close(input);
close(output);
end.