#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const long long p = 1e9 + 7;
long long num[maxn << 2];
int main() {
  int r, g, h;
  scanf("%d %d", &r, &g);
  h = sqrt(2 * (r + g)) + 1;
  while (h * (h + 1) / 2 > r + g) h--;
  num[r] = 1;
  for (int i = 1; i <= h; i++) {
    for (int j = 0; j <= r; j++) {
      if ((1 + i) * i / 2 - (r - j) < 0) {
        num[j] = 0;
        continue;
      }
      int reg = g - ((1 + i) * i / 2 - (r - j));
      if (reg >= 0)
        num[j] = (num[j] + num[j + i]) % p;
      else
        num[j] = num[j + i];
    }
  }
  long long ans = 0;
  for (int i = 0; i <= r; i++) ans = (ans + num[i]) % p;
  cout << ans;
}
