/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner s = new Scanner(System.in);
		
		int n = s.nextInt();
		
		int c = 0;
		int x = n;
		while (x > 0) {
			c++; x/=10;
		}
		
		int r = 0;
		
		c--;
		while (n > 0) {
			int k = n % 10;
			r += (int) Math.pow(10, c) * k;
			c--;
			n /= 10;
		}
		
		System.out.println(r);
	}
}