#include <bits/stdc++.h>
using namespace std;
int MOD = 1000000007;
int f[250000], b[250000];
int main() {
  int r, g, ans, h, j, i, temp;
  cin >> r >> g;
  memset(f, sizeof(f), 0);
  f[0] = 1;
  ans = 1;
  for (h = 1; h <= r + g; h++) {
    memset(b, 0, sizeof(b));
    for (j = 0; j <= r; j++)
      if (f[j] > 0) {
        if (j + h <= r) b[j + h] = (b[j + h] + f[j]) % MOD;
        if ((h * (h - 1) / 2 - j) + h <= g) b[j] = (b[j] + f[j]) % MOD;
      }
    temp = 0;
    for (i = 0; i <= r; i++) {
      temp = (temp + b[i]) % MOD;
      f[i] = b[i];
    }
    if (temp > 0)
      ans = temp;
    else
      break;
  }
  cout << ans << endl;
  return 0;
}
