#include<iostream>
#include<cmath>
int a[10];
using namespace std;
int main()
{
int y,g=1;
cin>>y;
int i=0,ny=0;
while(y)
{
a[i++]=y%10;
y=y/10;
}
while(i>=0)
{
ny+=g*a[i-1];
g*=10;
i--;
}
cout<<ny;
}