N = eval(input())

ans = 1

for i in range(1, N + 1):

	ans = (ans * i) % (1e9 + 7)

print(int(ans))
#!/usr/bin/env python



n=int(input().strip())



power=1

for i in range(1,n+1):

    power=power*i%(10**9+7)



print(power)
N = eval(input())
ans = 1
for i in range(1, N + 1):
    ans = (ans * i) % (1e9 + 7)
print(int(ans))

#!/usr/bin/env python
n = int(input().strip())
power = 1
for i in range(1, n + 1):
    power = power * i % (10**9 + 7)
print(power)

-N = eval(input()) -ans = 1 -for i in range(1, N + 1): -    ans = (ans * i) % (1e9 + 7) -print(int(ans)) +#!/usr/bin/env python +n = int(input().strip()) +power = 1 +for i in range(1, n + 1): +    power = power * i % (10**9 + 7) +print(power)