program cojs623;
var
s1,s2:string;
p,len,i:longint;
procedure zhuan;
var
i:longint;
begin
len:=length(s1);
for i:=1 to len do
s2[i]:=s1[len-i+1];
end;
begin
assign(input,'reverse.in');reset(input);
assign(output,'reverse.out');rewrite(output);
readln(s1);
if s1[1]='-' then
begin
delete(s1,1,1);
write('-');
zhuan;
end else zhuan;
p:=1;
while (p<len)and(s2[p]='0') do inc(p);
for i:=p to len do
write(s2[i]);
writeln;
close(input);close(output);
end.