#include <bits/stdc++.h>
using namespace std;
const int MODULE = 1000000007;
const int maxn = 200001;
long long r, g;
long long f[maxn];
long long qq(long long s) { return s * (s + 1) / 2; }
void add(long long &s, long long a) { s = (s + a) % MODULE; }
int main() {
  cin >> r >> g;
  long long h = 1;
  while (qq(h) <= r + g) h++;
  h--;
  memset(f, 0, sizeof(f));
  f[0] = 1;
  for (int i = 1; i <= h; i++) {
    for (int s = maxn - 1; s >= i; s--) {
      add(f[s], f[s - i]);
    }
  }
  long long total = qq(h);
  long long res = 0;
  for (int i = 0; i <= total; i++) {
    if (r >= i && total - i <= g) {
      add(res, f[i]);
    }
  }
  cout << res << endl;
}
