#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200100;
const int MOD = 1E9 + 7;
void add(int& a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
}
int R, G;
int DP[MAXN];
int main() {
  cin >> R >> G;
  DP[0] = 1;
  int N = 0;
  for (int i = 1; N + i <= R + G; ++i) {
    N += i;
    for (int k = G; k >= 0; --k) {
      if (k <= i * (i - 1) / 2 && i > R - i * (i - 1) / 2 + k) DP[k] = 0;
      if (k >= i) add(DP[k], DP[k - i]);
    }
  }
  int res = 0;
  for (int i = 0; i <= G; ++i) {
    add(res, DP[i]);
  }
  cout << res << endl;
  return 0;
}
