#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 2 * 1e5 + 5;
int dp[N];
int main() {
  int ans, r, g, tmp, h;
  memset(dp, 0, sizeof(dp));
  dp[0] = dp[1] = 1;
  ans = 0;
  cin >> r >> g;
  tmp = r + g;
  h = (-1 + sqrt(1 + 8.0 * tmp)) / 2;
  tmp = r < g ? r : g;
  for (int i = 2; i <= h; i++) {
    for (int j = tmp; j > 0; j--) {
      if (j - i >= 0) dp[j] = (dp[j] + dp[j - i]) % mod;
    }
  }
  for (int i = 0; i <= tmp; i++) {
    if (h * (h + 1) / 2 - i <= r + g - tmp) ans = (ans + dp[i]) % mod;
  }
  cout << ans << endl;
  return 0;
}
