#include <bits/stdc++.h>
using namespace std;
void setIO(string str, bool dbg) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (!dbg) {
    freopen((str + ".in").c_str(), "r", stdin);
    freopen((str + ".out").c_str(), "w", stdout);
  }
}
const long long int MAX = 2e5 + 5;
const long long int INF = 1e9 + 5;
const long long int MOD = 1e9 + 7;
const long long int LEN = 1e3 + 0;
int _ = 1;
int r, g;
long long int dps[MAX];
void slv() {
  cin >> r >> g;
  int h = 1;
  while ((h + 1) * (h + 2) / 2 <= r + g) h++;
  dps[0] = 1;
  for (int i = 1; i <= h; i++)
    for (int j = r; j >= i; j--) dps[j] = (dps[j] + dps[j - i]) % MOD;
  long long int ans = 0;
  int s = h * (h + 1) / 2;
  for (int i = r; i >= 0; i--)
    if (s - i <= g) ans = (ans + dps[i]) % MOD;
  cout << ans << "\n";
}
int main() {
  setIO("", 1);
  while (_--) slv();
  return 0;
}
