#include using namespace std; using int64 = long long; const int mod = 1e9 + 7; int main() { int64 N; cin >> N; if(N >= mod) { cout << 0 << endl; return 0; } int64 mul = 1; for(int i = 2; i <= N; i++) { mul *= i; mul %= mod; } cout << mul << endl; }