#include<stdio.h>

int main(){

int number;
scanf("%d", &number);
if(number == 0){
    printf("0");
    return 0;
}
while(number!=0){
    printf("%d", number%10);
    number/=10;
}
return 0;

}