#include <bits/stdc++.h>
using namespace std;
const int MX = 2e5 + 6;
const long long mod = 1e9 + 7;
const long long inf = (1ll << 60);
long long r, g, dp[2][200007], h;
int main() {
  cin >> r >> g;
  for (long long i = 1; ((i * (i + 1)) / 2) <= r + g; i++) {
    h = i;
  }
  if (!r && !g) {
    cout << 0 << endl;
    return 0;
  }
  if (!r) {
    cout << 1 << endl;
    return 0;
  }
  if (!g) {
    cout << 1 << endl;
    return 0;
  }
  long long cur = 0;
  dp[cur][r] = 1;
  for (int i = 1; i <= h; i++) {
    long long s = (i * (i - 1)) / 2;
    for (int j = 0; j < 200001; j++) dp[cur ^ 1][j] = 0;
    for (int j = 0; j <= r; j++) {
      long long re = j;
      long long gr = (g + r) - re - s;
      if (gr < 0) break;
      if (g < gr) continue;
      if (gr >= i) {
        dp[cur ^ 1][j] += dp[cur][j];
        dp[cur ^ 1][j] %= mod;
      }
      if (re >= i) {
        dp[cur ^ 1][j - i] += dp[cur][j];
        dp[cur ^ 1][j - i] %= mod;
      }
    }
    cur ^= 1;
  }
  long long ans = 0;
  for (int i = 0; i < MX; i++) ans += dp[cur][i] % mod;
  cout << ans % mod << endl;
}
