#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
const int maxn=17;
int main(){
freopen("reverse.in","r",stdin);
freopen("reverse.out","w",stdout);
int n,k=1;
cin>>n;
int a[maxn];
while(n>1){
n/=10;
k++;
}
for(int i=1;i<=k;i++)
a[i]=0;
for(int i=1;i<=k;i++){
int x=pow(10,i);
a[i]=n%x;
n/=10;
}
for(int i=0;i<k;i++)
a[i]=a[k-i];
for(int i=0;i<k;i++)
cout<<a[i];
fclose(stdin);fclose(stdout);
}