#include<bits/stdc++.h>
using namespace std;
int main(){
int x,s,g,h,b;
cin>>x;
g=x%10;
h=x/10%10;
b=x/100;
s=g*100+h*10+b;
cout<<s;
}
/**************************************************************
Problem: 1028
User: huanghengyi
Language: C++
Result: Accepted
Time:8 ms
Memory:2072 kb
****************************************************************/