#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX / 2, MOD = 1000000007, MAXN = (int)2e5 + 10;
const long long INFL = LLONG_MAX / 2;
template <typename T, typename U>
static void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static void amax(T &x, U y) {
  if (x < y) x = y;
}
int r, g;
int dp[MAXN], tp[MAXN];
void add(int &a, int b) {
  a += b;
  a %= MOD;
}
int main() {
  scanf("%d%d", &r, &g);
  int h = 0;
  while (((h + 2) * (h + 1)) / 2 <= (r + g)) h++;
  dp[0] = 1;
  for (int(i) = (int)(1); (i) <= (int)(h); ++(i)) {
    memset(tp, 0, sizeof tp);
    for (int(j) = (int)(0); (j) <= (int)(r); ++(j))
      if (j + i <= r) add(tp[j + i], dp[j]);
    for (int(j) = (int)(0); (j) <= (int)(r); ++(j)) add(dp[j], tp[j]);
  }
  int ans = 0;
  for (int(i) = (int)(0); (i) <= (int)(r); ++(i)) {
    if (g >= (h * (h + 1)) / 2 - i) add(ans, dp[i]);
  }
  printf("%d\n", ans);
  return 0;
}
