var
n,ans:longint;
begin
readln(n);
ans:=0;
while (n*-1<>0) or (n<>0) do begin
ans:=ans*10+n mod 10;
n:=n div 10;
end;
writeln(ans);
readln;
end.