#include
int main()
{
int n;
scanf("%d", &n);
int prevrten_broj = 0;
int tmp = n;
while(tmp > 0) {
int cifra = tmp % 10;
tmp /= 10;
prevrten_broj = (prevrten_broj * 10) + cifra;
}
printf("%d\n", prevrten_broj);
return 0;
}