Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int ans = 0;
int count = 0;
while (n % 10 != 0) {
n = n / 10;
count++;
}
while (n % 10 != 0) {
int rem = n % 10;
n = n / 10;
ans = (int)(ans + (Math.pow(rem, count)));
}
if(n == ans) {
System.out.println("true");
}else {
System.out.println("false");
}
