#include <stdio.h>
#include <math.h>
int main(){
    int num;
    scanf("%d",&num);
    int count;
    while(num>0){
        if(num%10==0){
            count++;
        }
    }
    int temp=num,res,sum;
    while(temp>0){
        res=temp%10;
        sum+=pow(res,count);
        temp/=10;
    }
    if(sum==num){
        printf("%d is a armstrong number.",num);
    }
    return 0;
}