#include <bits/stdc++.h>
using namespace std;
int dp[2][200005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int mod = 1e9 + 7;
  int r, g;
  cin >> r >> g;
  int H = 0;
  while (H * (H + 1) <= 2 * (r + g)) H++;
  H--;
  dp[0][0] = 1;
  for (int h = 1; h <= H; h++) {
    int state = h & 1;
    for (int red = 0; red <= r; red++) {
      dp[state][red] = 0;
      if (red - h >= 0) {
        dp[state][red] = dp[1 - state][red - h] % mod;
      }
      if (g - ((h * (h - 1)) / 2 - red) >= h) {
        dp[state][red] = (dp[state][red] + dp[1 - state][red]) % mod;
      }
    }
  }
  int ans = 0;
  for (int red = 0; red <= r; red++) {
    ans = (ans + dp[H & 1][red]) % mod;
  }
  cout << ans << endl;
  return 0;
}
