#include #define repeat(i,n) for (int i = 0; (i) < int(n); ++(i)) using ll = long long; using namespace std; const int mod = 1e9+7; int main() { ll n; cin >> n; ll x = 1; for (ll i = 1; i <= n; ++ i) x = x * i % mod; cout << x << endl; return 0; }