/******************************************************************************
Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.
*******************************************************************************/
#include <stdio.h>
int digitCount(int n){
int count=0;
while(n!=0)
{
count++;
n=n/10;
}
return count;
}
int power(int y, int count){
if(count>0)
return power(y,count-1)*y;
else
return 1;
}
int armstrongNumber(int n){
int count=digitCount(n);
int sum=0;
while(n!=0){
int y=n%10;
int res=power(y,count);
sum=sum+res;
n=n/10;
}
return sum;
}
int main()
{
int n;
scanf("%d",&n);
int result=armstrongNumber(n);
if(result==n)
printf("armstrong Number");
else
printf("not");
return 0;
}