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)))
def factorial(N):

    power_r = 1

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

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

    return power_r



if __name__ == '__main__':

    N = int(eval(input()))

    print((factorial(N)))
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)))

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


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

-        power_r *= n -        power_r %= 10**9 + 7 +        power_r = power_r * n % (10**9 + 7)