from collections import defaultdict





def main():

    N = int(eval(input()))

    ans = 1

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

        ans *= i

        ans %= 10 ** 9 + 7

    print((ans % (10 ** 9 + 7)))





if __name__ == '__main__':

    main()

from collections import defaultdict

MOD = 10 ** 9 + 7





def main():

    N = int(eval(input()))

    ans = 1

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

        ans *= i

        ans %= MOD

    print((ans % MOD))





if __name__ == '__main__':

    main()

from collections import defaultdict


def main():
    N = int(eval(input()))
    ans = 1
    for i in range(1, N + 1):
        ans *= i
        ans %= 10**9 + 7
    print((ans % (10**9 + 7)))


if __name__ == "__main__":
    main()

from collections import defaultdict

MOD = 10**9 + 7


def main():
    N = int(eval(input()))
    ans = 1
    for i in range(1, N + 1):
        ans *= i
        ans %= MOD
    print((ans % MOD))


if __name__ == "__main__":
    main()

+ +MOD = 10**9 + 7 -        ans %= 10**9 + 7 -    print((ans % (10**9 + 7))) +        ans %= MOD +    print((ans % MOD))