# your code goes here #step N=int(input()) u=0 if N>=60: print("000000000000") else: S=1 for i in range(1,N+1): S*=i if S>999999999999: S=str(S) S=S[-12:] S=int(S) u=1 if u==1 and S<1000000000000: S=str(S) for i in range (12-len(S)): S="0"+S print(S)