#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long gauss(long long x) { return (x * (x + 1)) / 2; }
long long R, G, H, ANS, DP[400005];
int main() {
  cin >> R >> G;
  DP[0] = 1;
  while (gauss(H) <= R + G) H++;
  H--;
  for (long long i = 1; i <= H; i++) {
    for (long long j = R; j >= 0; j--)
      DP[j] = (DP[j] + (i <= j ? DP[j - i] : 0)) % MOD;
  }
  for (long long i = 0; i <= R; i++)
    if (gauss(H) - i <= G) ANS = (ANS + DP[i]) % MOD;
  cout << ANS << endl;
}
