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