// Armstrong Numbers
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748...
while True:
n = input()
n1 = [int(d) for d in str(n)]
a = []
ans = 0
for i in n1:
a.append(i**len(n))
for j in a:
ans += int(j)
if ans == int(n):
print('This number is an armstrong number')
elif ans != int(j):
print("this number is not a armstrong number")
if n == 'stop' or ans == "Stop":
break