#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;
}
/**************************************************************
	Problem: 1028
	User: yangjunwenredianling
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/