#include<cstdio>
#include<cstring>
using namespace std;
#define ll long long
ll fac[100005];
const ll mod = 1e9 + 7;
int main()
{
    fac[1] = 1;
    for (int i = 2; i <= 100000; i++)
    {
        fac[i] = (fac[i - 1] * i)%mod;
    }
    int n;
    scanf("%d",&n);
    printf("%lld\n",fac[n]);
}
