#include <bits/stdc++.h>
using namespace std;
int a[200001], i, j, r, v, sum, sol;
int main() {
  cin >> r >> v;
  sum = 0;
  a[0] = 1;
  for (i = 1; sum + i <= r + v; i++) {
    sum += i;
    for (j = min(sum, r); j >= i; j--) {
      a[j] = (a[j] + a[j - i]) % 1000000007;
    }
  }
  for (i = max(sum - v, 0); i <= min(sum, r); i++) {
    sol = (sol + a[i]) % 1000000007;
  }
  cout << sol;
  return 0;
}
