#include <bits/stdc++.h>
using namespace std;
int dp[2][200005];
int red, green, hight;
int main() {
  int i, j, g, h, r, tot = 0;
  scanf("%d", &red);
  scanf("%d", &green);
  i = 1;
  while ((i * (i + 1)) / 2 <= (red + green)) {
    tot += i;
    i++;
  }
  hight = i - 1;
  for (i = 0; i <= red; i++) dp[0][i] = 1;
  for (h = 1; h <= hight; h++) {
    for (r = 0; r <= red; r++) {
      dp[1][r] = 0;
      int used_red = red - r;
      int used_green = (hight * (hight + 1)) / 2 - (h * (h + 1)) / 2 - used_red;
      if (used_green > green) continue;
      if (r >= h) dp[1][r] = dp[0][r - h];
      if (green - used_green >= h)
        dp[1][r] = (dp[1][r] + dp[0][r]) % 1000000007;
    }
    for (i = 0; i <= red; i++) {
      dp[0][i] = dp[1][i];
    }
  }
  cout << dp[0][red] << endl;
  return 0;
}
