from math import factorial

print((factorial(int(eval(input())))%(10**9+7)))
from math import *

print((factorial(int(eval(input())))%(10**9+7)))
from math import factorial

print((factorial(int(eval(input()))) % (10**9 + 7)))

from math import *

print((factorial(int(eval(input()))) % (10**9 + 7)))

-from math import factorial +from math import *