#include <bits/stdc++.h>
using namespace std;
int dp[200001], countH, numH, high, y, r, g, t;
int main() {
  long long i, j, ans;
  while (cin >> r >> g) {
    memset(dp, 0, sizeof(dp));
    if (r < g) {
      t = g;
      g = r;
      r = t;
    }
    y = r + g;
    high = 1;
    ans = 0;
    while (high * (high + 1) / 2 <= y) high++;
    dp[0] = 1;
    dp[1] = 1;
    for (i = 2; i < high; i++) {
      for (j = r; j >= i; j--) {
        if (j + g >= i * (i + 1) / 2) dp[j] = (dp[j] + dp[j - i]) % 1000000007;
      }
    }
    for (i = 0; i <= r; i++) {
      if (i + g >= (high - 1) * high / 2) ans = (ans + dp[i]) % 1000000007;
    }
    cout << ans << endl;
  }
  return 0;
}
