n=int(input()) if n>100: print("000000000000") exit() def fact(n,mod=10**12): powlist=[0]*(n+1) powlist[0]=1 powlist[1]=1 for i in range(2,n+1): powlist[i]=powlist[i-1]*i%(mod) return powlist[-1] ans = fact(n) if ans==0: print("000000000000") else: print(ans)