#include <bits/stdc++.h>
using namespace std;
int dp[2][200003];
int main() {
  int r, g, A, h = 1;
  cin >> r >> g;
  A = r + g;
  while (1) {
    if ((h + 1) * (h + 2) / 2 > A) break;
    ++h;
  }
  for (int i = 0; i <= r; i++) {
    dp[0][i] = dp[1][i] = 1;
  }
  for (int i = h; i > 0; i--) {
    for (int j = 0; j <= r; j++) {
      int &ret = dp[i & 1][j];
      ret = 0;
      if (j >= i) {
        ret += dp[(i & 1) ^ 1][j - i];
        ret %= 1000000007LL;
      }
      int gl = g - (i * (i - 1) / 2 - (r - j));
      if (gl >= i) {
        ret += dp[(i & 1) ^ 1][j];
        ret %= 1000000007LL;
      }
    }
  }
  cout << dp[1][r];
}
