x=int(input()) if x>100: print("000000000000") else: for i in range (1,x): x*=i print(x%1000000000000)