import math n = int(input()) print(math.factorial(n)%1000000000000)