N = int(eval(input()))

a = 1

for n in range(2,N+1):

    a = a*n % (10**9+7)

print(a)
def factorial(N):

    a = 1

    for n in range(2,N+1):

        a = a*n % (10**9 + 7)

    return a



if __name__ == '__main__':

    N = int(eval(input()))

    print((factorial(N)))
N = int(eval(input()))
a = 1
for n in range(2, N + 1):
    a = a * n % (10**9 + 7)
print(a)

def factorial(N):
    a = 1
    for n in range(2, N + 1):
        a = a * n % (10**9 + 7)
    return a


if __name__ == "__main__":
    N = int(eval(input()))
    print((factorial(N)))

-N = int(eval(input())) -a = 1 -for n in range(2, N + 1): -    a = a * n % (10**9 + 7) -print(a) +def factorial(N): +    a = 1 +    for n in range(2, N + 1): +        a = a * n % (10**9 + 7) +    return a + + +if __name__ == "__main__": +    N = int(eval(input())) +    print((factorial(N)))