#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<stack>
#include<queue>
using namespace std;
int main()
{
	
	int i, n;
	long long num[100001] = {0,1};
	for (i = 2; i <= 100001; i++)
		num[i] = (num[i-1] * i)%(1000000007);
	while (cin>>n)
	{
		cout << num[n]<< endl;
	}
	return 0;
}
