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