import sys
def f(x):
if x==0 or x==1:
print("1", end="")
return 1
else:
print(f"{x} * ", end="")
return f(x-1)*x
for s in sys.stdin:
x=int(s)
print(f"{x}! = ", end="")
ans=f(x)
print(f" = {ans} ")