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

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