#include <bits/stdc++.h>
using namespace std;
const int N = 200010, MOD = 1e9 + 7, sn = 500;
int dp[N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int r, g, h;
  cin >> r >> g;
  for (int i = 1; i * (i + 1) / 2 <= r + g; i++) h = i;
  dp[0] = 1;
  for (int i = 1; i < h + 1; i++)
    for (int j = r; j >= i; j--) {
      dp[j] += dp[j - i];
      dp[j] %= MOD;
    }
  int ans = 0;
  for (int i = 0; i < r + 1; i++)
    if (h * (h + 1) / 2 - i <= g) {
      ans += dp[i];
      ans %= MOD;
    }
  cout << ans;
  return 0;
}
