var
a:ansistring;
i,k:qword;j,pan,pan2:integer;
begin
assign(input,'reverse.in');
assign(output,'reverse.out');
reset(input);
rewrite(output);
read(a);
k:=length(a);
i:=k;
if a[1]='-' then begin write('-');a[1]:='0';pan2:=1;end;
while i<>0 do
begin
j:=ord(a[i])-48;
if j<>0 then pan:=1;
if pan=1 then write(j);
i:=i-1;
if (pan2=1) and (i=1) then exit;
end;
close(input);
close(output);
end.