#include<bits/stdc++.h>
using namespace std;
int main()
{
	int N,s=0;
	cin>>N;
	while(N)
	{
	s=s*10+N%10;
	N/=10;	
	}
	cout<<s;
	return 0;
}

/**************************************************************
	Problem: 1121
	User: ccf
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2072 kb
****************************************************************/