#include <bits/stdc++.h>
using namespace std;
const int maxN = 2e5 + 100;
int dp[2][maxN], m, p, r, g, mod = 1e9 + 7, h;
int main() {
  scanf("%d", &r), scanf("%d", &g);
  while ((h + 1) * (h + 2) <= 2 * (r + g)) ++h;
  for (int i = 0; i < maxN; ++i) dp[p][i] = 1;
  for (int curlevel = h; curlevel > 0; --curlevel) {
    p = !p;
    memset(dp[p], 0, sizeof dp[p]);
    for (int remred = 0; remred <= r; ++remred) {
      if (remred >= curlevel) {
        dp[p][remred] = dp[!p][remred - curlevel];
      }
      int rg = g - (curlevel * (curlevel - 1) / 2 - (r - remred));
      if (rg >= curlevel) {
        dp[p][remred] += dp[!p][remred];
        if (dp[p][remred] >= mod) dp[p][remred] -= mod;
      }
    }
  }
  cout << dp[p][r];
}
