#include <bits/stdc++.h>
using namespace std;
int main(){
int a,q,w,e;
cin>>a;
q=a%10;
e=a/10%10;
w=a/100;
cout<<q*100+e*10+w;
return 0;
}
/**************************************************************
Problem: 1028
User: ljl2
Language: C
Result: Compile Error
****************************************************************/