#include <bits/stdc++.h>
using namespace std;
int dp[2][200005];
int mod = 1000000007;
int main() {
  int r, g, h, i, j, k;
  long long sum, ans = 0;
  double temp;
  cin >> r >> g;
  temp = (sqrt(1 + 8 * (r + g)) - 1) / 2.0;
  h = temp;
  sum = ((long long)h * (long long)(h + 1)) / 2;
  dp[0][0] = dp[1][0] = 1;
  for (i = 1; i <= h; i++) {
    k = i % 2;
    for (j = 1; j <= r; j++) {
      dp[k][j] = dp[(i - 1) % 2][j];
      if (j >= i) dp[k][j] += dp[(i - 1) % 2][j - i];
      if (dp[k][j] >= mod) dp[k][j] %= mod;
      if (i == h && j + g >= sum) {
        ans += dp[k][j];
        if (ans >= mod) ans %= mod;
      }
    }
  }
  if (g >= sum) ans = (ans + 1) % mod;
  cout << ans;
}
