var
ss:string;
tt,i:longint;
flag:boolean;
begin
assign(input,'reverse.in');
assign(output,'reverse.out');
reset(input);
rewrite(output);
readln(ss);
tt:=1;
if ss[1]='-'then tt:=2;
if tt=2 then write('-');
flag:=false;
for i:=length(ss) downto tt do
begin
if ord(ss[i])<>ord('0') then flag:=true;
if (ord(ss[i])<>48)or flag then write(ss[i]);
end;
close(input);
close(output);
end.