#include <bits/stdc++.h>
using namespace std;
long long r, g, i, j, h, a, f[200005], mod = 1000000007;
int main() {
  cin >> r >> g;
  f[0] = 1;
  for (i = 1; i * (i + 1) / 2 <= r + g; i++)
    for (j = r; j >= 0; j--)
      if (j >= i) f[j] = (f[j] + f[j - i]) % mod;
  h = i - 1;
  for (i = 0; i <= r; i++)
    if (h * (h + 1) / 2 - i <= g) a = (a + f[i]) % mod;
  cout << a;
  return 0;
}
