import java.util.*;
public class ArmStrongNumber {
public static void checkNumber(int n) {
int temp;
int digit = 0;
int sum = 0;
int last = 0;
temp = n;
while (temp > 0) {
temp /= 10;
digit += 1;
}
temp = n;
while (temp > 0) {
last = temp % 10;
sum += Math.pow(last, digit);
temp /= 10;
}
if (n == sum) {
System.out.println(n + " is an ArmStrong Number");
} else {
System.out.println(n + " is not an ArmStrong Number");
}
}
public static void main(String args[]) {
checkNumber(153);
}
}