#include <stdio.h>
#include <math.h>


int main()

 {
	 int n;
     int temp;
     int digit;
     int count = 0;
     int sum = 0;


     scanf("%d", &n);

     temp = n;

      while (temp > 0)
    {


      count++;

      temp = temp / 10;

    }


      temp = n;

      while (temp >0)

     {

       digit = temp % 10;

       sum = sum + pow(digit, count);


       temp = temp / 10;

     }


       (sum == n) ?
       printf("armstrong number") : 
     printf("not an armstrong number");



	return 0;
}
