#include using namespace std; const unsigned long N = 1000000007; unsigned long fact(unsigned long x) { if (x == 0) { return 1; } return x * fact(x - 1) % N; } int main() { unsigned long x; cin >> x; cout << fact(x) << endl; return 0; }