using System;
public class Program
{
public static void Main()
int reverse = 0;
int k = int.Parse(Console.ReadLine());
while (k>0)
{ int a = k % 10;
reverse = reverse*10 + a;
k = k/10;
}
Console.WriteLine(reverse);