#include using namespace std; using ll = long long; using P = pair; #define rep(i, n) for(ll i = 0; i < n; i++) #define all(x) (x).begin(),(x).end() templatebool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;} templatebool chmax(T&a, const T&b){if(a fac(MAX_N), finv(MAX_N), inv(MAX_N); void init(){ fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for(int i=2;i> n >> k; if(k==0 || n==k){ cout << 1 << endl; return 0; } if(k==1){ if(!(n%2)) cout << 2 << endl; else cout << n/2+2 << endl; return 0; } if(k==n-1){ cout << n-2 << endl; return 0; } ll ans = 0; for(int i=0;i<=n-k;i+=2){ ll x = mcomb(n-2-i, k-2) * (i + 1) % MOD; ans = (ans + x) % MOD; } cout << ans << endl; return 0; }