#include <bits/stdc++.h>
using namespace std;
long long r, g, h, total;
int main() {
  cin >> r >> g;
  total = r + g;
  for (; h * (h + 1) / 2 <= total; h++)
    ;
  h--;
  int dp[2][200002];
  memset(dp, 0, sizeof dp);
  for (int i = 0; i <= r; i++) dp[1][i] = 1;
  for (int i = h - 1; i >= 0; i--) {
    for (int j = 0; j <= r; j++) {
      int BlocksUsed = h * (h + 1) / 2 - (h - i) * (h - i + 1) / 2;
      long long BlocksNeededNow = h - i, greenLeft = total - (j + BlocksUsed);
      if (BlocksNeededNow <= j)
        dp[0][j] += dp[1][j - BlocksNeededNow], dp[0][j] %= 1000000007;
      if (BlocksNeededNow <= greenLeft)
        dp[0][j] += dp[1][j], dp[0][j] %= 1000000007;
    }
    for (int j = 0; j <= r; j++) dp[1][j] = dp[0][j], dp[0][j] = 0;
  }
  cout << dp[1][r];
  return 0;
}
