#include #include #include #include #include #include using namespace std; long long int N = 1000000009; int main() { long long int n; cin >> n; long long int sum1 = 1; long long int sum0 = 0; int count = 2; long long int ans = 1; while(count <= n){ if(count%2==0){ ans = ( count * sum1 ) % N ; sum0 = (sum0 + ans ) % N; } else{ ans = ( count * sum0 ) % N ; sum1 = (sum1 + ans) % N; } count++; } cout << ans << endl; return 0; }