#include<bits/stdc++.h>
using namespace std;
int main(){
	int i=0,n=0,m,b=0,v=0;
	cin>>m;
	i=m%10;
	n=m/10%10;
	b=m/100;
	v=m+i*100+n*10+b;
	cout<<v; 
    
}
/**************************************************************
	Problem: 1020
	User: huxuanchen
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/