import java.util.Scanner;
public class E6_3 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Please input an integer: ");
int n = input.nextInt();
System.out.println(reverse(n));
}
public static int reverse(int n) {
int result = 0;
while(n!=0) {
result = result*10 + n%10;
n/=10;
}
return result;
}
}