#include <bits/stdc++.h>
using namespace std;
const int e = 2e5 + 100;
const int p = 1000000007;
long long dp[3][e];
int h, r, g;
int main() {
  cin >> r >> g;
  if (r == 0 or g == 0) {
    cout << 1;
    return 0;
  }
  for (h = 1;; h++) {
    if (h * (h + 1) > 2 * r + g * 2) {
      break;
    }
  }
  h--;
  dp[1][1] = 1;
  dp[1][0] = 1;
  for (int i = 2; i <= h; i++) {
    int w = i % 2;
    int l = w ^ 1;
    for (int j = 0; j <= g; j++) {
      dp[w][j] = 0;
    }
    for (int j = 0; j <= g; j++) {
      if (i * (i + 1) / 2 - j <= r) dp[w][j] += dp[l][j];
      if (dp[w][j] > p) dp[w][j] -= p;
      if (j - i >= 0) dp[w][j] += dp[l][j - i];
      if (dp[w][j] > p) dp[w][j] -= p;
    }
  }
  long long ans = 0;
  for (int i = 0; i <= g; i++) {
    ans += dp[h % 2][i];
    ans %= p;
  }
  cout << ans;
  return 0;
}
