#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 + g)) h++;
  dp[0] = 1;
  for (int i = 1; i <= h; i++) {
    for (int j = r; j >= 0; j--) {
      if (j >= i) {
        dp[j] = (dp[j] + dp[j - i]) % 1000000007;
      }
    }
  }
  int ans = 0;
  for (int i = 0; i <= r; i++) {
    int x = (h * (h + 1)) / 2 - i;
    if (x <= g) ans = (ans + dp[i]) % 1000000007;
  }
  cout << ans;
  return 0;
}
