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