N = int(eval(input()))

power_r = 1

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

    power_r *= n

    power_r %= 10**9+7

print(power_r)
def factorial(N):

    power_r = 1

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

        power_r *= n

        power_r %= 10**9+7

    return power_r



if __name__ == '__main__':

    N = int(eval(input()))

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

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


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

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