#include <bits/stdc++.h>
using namespace std;
long long int dp1[200001], dp2[200001];
int main() {
  long long int r, g, h, i, j;
  scanf("%lld %lld", &r, &g);
  if (r > g) swap(r, g);
  h = (sqrt(1 + 8 * r + 8 * g) - 1.0) / 2;
  if (r == 0 || g == 0) {
    printf("1\n");
    return 0;
  }
  dp1[0] = 1;
  dp1[1] = 1;
  long long int sum = 2, k;
  for (i = 2; i <= h; i++) {
    sum = 0;
    k = (i * (i + 1)) / 2;
    for (j = max(k - g, (long long int)0); j <= r; j++)
      dp2[j] = (dp1[j] + ((j >= i) ? dp1[j - i] : 0)) % 1000000007;
    for (j = max(k - g, (long long int)0); j <= r; j++) dp1[j] = dp2[j];
  }
  for (i = max(k - g, (long long int)0); i <= r; i++)
    sum = (sum + dp2[i]) % 1000000007;
  cout << sum << "\n";
}
