#include<stdio.h>
int main()
{
int n,num;
scanf("%d\n",&n);
while(n!=0)
{
num=n%10;
n/=10;
printf("%d",num);
}
return 0;
}