#include <bits/stdc++.h>
using namespace std;
long long dp[2 * 100005];
int main() {
  long long g, r, h, i, j, tot, ans;
  h = 0;
  i = 1;
  cin >> r >> g;
  while (i * (i + 1) / 2 <= r + g) i++;
  i--;
  h = i;
  tot = h * (h + 1) / 2;
  dp[0] = 1;
  for (i = 1; i <= h; i++) {
    for (j = r; j >= i; j--) dp[j] = (dp[j] + dp[j - i]) % 1000000007;
  }
  ans = 0;
  for (i = 0; i <= r; i++)
    if (g >= tot - i) ans = (ans + dp[i]) % 1000000007;
  cout << ans;
  return 0;
}
