var a, b, c, d:integer;
begin
readln(a);
d:=(a mod 10) *100;
c:= (a div 10 mod 10)*10;
b:= a div 100;
a:=d+c+b;
writeln(a);
end.
var a, b, c, d:integer;
begin
readln(a);
d:=(a mod 10) *100;
c:= (a div 10 mod 10)*10;
b:= a div 100;
a:=d+c+b;
writeln(a);
end.