#include<iostream> using namespace std; int main(){ int a,b,c,d,e; cin>>a; b=a%10; c=(a%100-b)/10; d=a/100; e=(b*100)+(c*10)+d; cout<<e; }