#include <bits/stdc++.h>
using namespace std;
const long long N = 200005;
const long long mod = 1e+9 + 7;
long long f[N], n, r, g;
signed main() {
  ios::sync_with_stdio(false);
  cin >> r >> g;
  for (long long i = 1; i <= r + g + 1; i++) {
    long long t = i * (i + 1) / 2;
    if (t > r + g) {
      n = i - 1;
      break;
    }
  }
  f[0] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = r; j >= i; j--) {
      f[j] = (f[j] + f[j - i]) % mod;
    }
  }
  long long max_r = r;
  long long min_r = n * (n + 1) / 2 - g;
  long long ans = 0;
  for (long long i = max(0ll, min_r); i <= max_r; i++) {
    ans = (ans + f[i]) % mod;
  }
  cout << ans << endl;
}
