#include
#include
int reverse(int value);
void main()
{
int a,value;
scanf("%d",&value);
a=reverse(value);
printf("\n%d",a);
}
int reverse(int value)
{
if(value == 0)
{
return 0;
}
int len = 0;
int c = value % 10;
int other = c;
if(value >= 10)
{
int tmp = value;
while(tmp / 10 > 10)
{
tmp /= 10;
len++;
}
other = (int) (c * pow(10, len + 1));
}
return other + reverse(value / 10);
}