import java.util.*;
public class Q2
{
static Scanner console = new Scanner(System.in);
public static void main(String[] args)
{
int num;
int reverse ;
int num1 ;
boolean done ;
reverse = 0;
num1 = 0;
done = false;
System.out.print("Enter an integer: ");
num = console.nextInt();
System.out.print(" Your number with the digits reversed is ");
if (num < 0)
{
num = -num;
done = true;
}
while (num > 0)
{
reverse = reverse * 10 + num % 10;
num = num / 10;
num1++;
}
if ( done )
System.out.print("");
num1--;
if (num1 > 0)
while (reverse / (int)(Math.pow(10, num1)) == 0)
{
System.out.print(0);
num1--;
}
System.out.println(reverse);
}
}