int main()
{
    int n = 0;
    scanf("%d",&n);
    while(n)
    {
        int k = n%10;
        printf("%d",k);
        n/=10;
    }
    return 0;
}