#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef pair P; typedef pair PL; const ll mod = 1e9 + 7; int main() { ll n; cin >> n; if (n >= mod){ cout << 0 << endl; return 0; } ll ans; int p = 100000000; ll a[] = {1, 927880474,933245637,668123525,429277690,733333339,724464507,957939114,203191898,586445753,698611116}; int x = n/p, y = n % p; ans = a[x]; FOR(i,1,y){ ans = (ans * (x*p + i)) % mod; } cout << ans << endl; return 0; }