class Armstrong
{
public static void main(String[] args)
{
int n = 371;
int rem;
int n1 = 0;
int temp;
temp = n;
while (n>0)
{
rem = n % 10;
n = n / 10;
n1 = n1 +(rem * rem * rem);
}
if (temp == n1)
{
System.out.println("The "+temp+" is armstrong number");
}
else
System.out.println("The "+temp+" is not armstrong number");
}
}