#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int dp[300000];
int main() {
  int r, g;
  cin >> r >> g;
  int h;
  int low = 0, high = 1000;
  while (low <= high) {
    int mid = (low + high) / 2;
    if (mid * (mid + 1) / 2 <= r + g)
      h = mid, low = mid + 1;
    else
      high = mid - 1;
  }
  int all = h * (h + 1) / 2;
  dp[0] = 1;
  for (int i = 1; i <= h; i++) {
    for (int j = r; j >= 0; j--) {
      dp[j + i] += dp[j];
      dp[j + i] %= mod;
    }
  }
  int ans = 0;
  for (int i = min(all, r); i >= max(0, all - g); --i) {
    ans = (ans + dp[i]) % mod;
  }
  cout << ans;
  return 0;
}
