#include <bits/stdc++.h>
using namespace std;
int R, G;
long long dp[3][200010];
int H;
inline void ReadInput(void) {
  scanf("%d", &R);
  scanf("%d", &G);
}
inline void solve(void) {
  double foo = (R + G) * 8;
  foo++;
  foo = sqrt(foo);
  foo--;
  foo /= 2.0;
  H = floor(foo);
  int flag = 0;
  for (int lev = 1; lev <= H; lev++) {
    for (int r = 0; r <= R; r++) {
      if (lev == 1) {
        if (r == 1)
          dp[flag][r] = 1;
        else if (r == 0 and G >= 1)
          dp[flag][r] = 1;
      } else {
        dp[flag][r] =
            ((r >= lev ? dp[!flag][r - lev] : 0) +
             (G >= lev and ((lev * (lev - 1)) / 2 <= G - lev + r) ? dp[!flag][r]
                                                                  : 0));
        if (dp[flag][r] >= 1000000007) dp[flag][r] -= 1000000007;
      }
    }
    flag = !flag;
  }
  long long ans = 0;
  long long temp = (H * (H + 1)) / 2;
  temp -= (R + G);
  temp = (temp * (-1));
  for (int i = max(0, R - (int)temp); i <= R; i++) {
    ans += dp[!flag][i];
    if (ans >= 1000000007) ans -= 1000000007;
  }
  printf("%I64d\n", ans);
}
inline void Refresh(void) {}
int main() {
  ios_base::sync_with_stdio(false);
  ReadInput();
  solve();
  return 0;
}
