include

using namespace std;
int main()
{
int a,c,d,e,f;
cin>>a;
c=a/100;
d=(a-100*c)/10;
e=a%10;
cout<<e<<d<<c;
return 0;
}