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