import sys t="" for x in sys.stdin.readlines(): x=int(x) if x==0:t+="1\n";continue for n in xrange(2,x): x*=n t+=str(x)+"\n" print t