#include <stdio.h>
#include<malloc.h>
int* arr;
int numlen(int num) {
    int len=0;
    while (num) {
        num /= 10;
        len++;
    }
    return len;

}

int* Arrcul(int num, int len) {
    int* arr = (int*)malloc(len * sizeof(int));
    int index = 0;
    while (num) {
        arr[index++] = num % 10;
        num /= 10;
    }
    return arr;
}

int main() {
    int n;
    int  sum = 0;
    scanf("%d", &n);
    int len = numlen(n);
    arr = Arrcul(n, len);
    for (int i = 0; i < len; i++)
        printf("%d", arr[i]);
}