#include #include #include #include #include #include #include using namespace std; using ll = long long; constexpr int P = 1000000007; int main() { int n, m; cin >> n >> m; int k = m - n + 1; vector x(k); x[1] = 1; for (int i = 2; i < k; i++) { x[i] = P - (P / i * (ll)x[P % i] % P); } ll t = 1, s = t; for (int i = 1; i < k; i++) { t = t * (i + n) % P * x[i] % P; s += t; if (s >= P) s -= P; } cout << s << endl; return 0; }