#include<iostream> using namespace std; int main(){ int n; cin>>n; int a=n/100; int b=n/10%10; int c=n%10; printf("%d",100*c+10*b+a); return 0; }