#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint; int main() { mint::set_mod((ll)1e9 + 7); int N, M;cin >> N >> M; vector fac(N + M + 1, 1); for (int i = 1;i <= N + M;i++) fac[i] = i * fac[i - 1]; mint ans = 0; if (N == 1) { cout << 1 << endl; return 0; } for (int l = 0;l <= M;l++) { int r = M - l; int mod = ((r - l + (2 * N) % (2 * N)) + (2* N)) % (2 * N); //cout <