import math

for n in range(100,1000):
    a=n//100
    b=n//10%10
    c=n%10
    if n==math.factorial(a)+math.factorial(b)+math.factorial(c):
        print(n)
    n+=1
/**************************************************************
	Problem: 1258
	User: admin
	Language: Python
	Result: Runtime Error
****************************************************************/