#include <bits/stdc++.h>
const int maxn = 200001;
const int M = 1e9 + 7;
int f[maxn];
int main() {
  int r, g, s, n, minr, maxr;
  int res = 0;
  scanf("%i %i", &r, &g);
  s = r + g;
  n = (-1 + (int)sqrt(1.0 + 8 * s)) / 2;
  s = (1 + n) * n / 2;
  f[0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = r; j >= i; j--) f[j] = (f[j] + f[j - i]) % M;
  for (int i = 0; i <= r; i++)
    if (i + g >= s) res = (res + f[i]) % M;
  printf("%i\n", res);
  return 0;
}
