#include <stdio.h>
#include <math.h>
int isarmstrong(int n)
{
    int n,sum = 0;
    int r,N_copy;
    N_copy = n;
    while(N_copy != 0 || N_copy>0)
    {
        r=n%10;
        sum = sum+(r*r*r);
        n= n/10;
    }
}
int main()
{
    int n;
    scanf("%d", &n);
    if(isarmstrong(n))
    {
        printf("Armstrong");
    }
    if(N_copy < 0)
    {
        printf("Invalid Input");
        return 0;
    }
}