import java.util.Scanner;

public class Main {
    
    public static void main(String[] args) {
        
        // 1.获取整数
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        
        // 2.整数转换为字符串,再转化为字符数组
        char[] array = (String.valueOf(n)).toCharArray();
        
        // 3.首尾交换
        int start = 0;
        int end = array.length-1;
        while(start <= end) {
            char temp = array[end];
            array[end] = array[start];
            array[start] = temp;
            start++;
            end--;
        }
        
        // 4.字符数组转换为字符串并输出
        String str = String.valueOf(array);
        System.out.println(str);
        
    }
}