#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cctype>
#include <sstream>
#include <cmath>
using namespace std;
const int inf =0x3f3f3f3f;
typedef long long LL;
const int N = 100005;
const int MAXN=100005;
const int mod=1000000007;
LL fact[MAXN];
void init()
{
    fact[0]=1;
    for(int i=1;i<=100000;i++)
        fact[i]=fact[i-1]*i%mod;
}
int main()
{
    int n;
    init();
    while(~scanf("%d", &n))
    {
        printf("%lld\n", fact[n]);
    }
    return 0;
}
