Program Zif_3_28_k(input,output);
Var a:integer;
begin
     read(a);
     write((a mod 10)*100+(a div 100)+(a div 10 mod 10)*10)
end.