#include<bits/stdc++.h>
using namespace std;
int x,s;
int main(){
	cin>>x;
	while(x!=0){
		s=s*10+x%10;
		x=x/10;
	}
	cout<<s;
	return 0;
}
/**************************************************************
	Problem: 1121
	User: zhangziang
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/