#include<stdio.h>
int main()
{
long long int flag,i,N,x,count,sum=0;
scanf("%lld", &N);
if (N < 0)
{
N = -N;
flag = 1;
}
else
flag = 0;
for (i = 1; i <= 10; i++)
{
if (N == 0)
{
N = sum;; break;
}
count = N % 10;
sum = sum * 10 + count;
N = N / 10;
}
if (flag == 0)printf("%lld", sum);
if (flag == 1)printf("-%lld", sum);
return 0;
}