import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.print("Enter a number : ");
long num = in.nextLong();
long rem;
long rev = 0;
while(num != 0){
rem = num % 10;
rev = rev * 10 + rem;
num /= 10;
}
System.out.println("Reverse is "+rev);
}
}