#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int R, G;
inline int tot(int x) { return x * (x + 1) / 2; }
inline int add(int a, int b) { return (a + b) % mod; }
void solve(int testcase) {
  cin >> R >> G;
  int ans = 0;
  int h = 1;
  while (tot(h + 1) <= R + G) h++;
  vector<int> prev(R + 1), cur(R + 1);
  if (G > 0) cur[0] = 1;
  if (R > 0) cur[1] = 1;
  for (int i = (2); i <= (h); i++) {
    prev = cur;
    fill(cur.begin(), cur.end(), 0);
    for (int j = (0); j <= (R); j++) {
      int x = tot(i);
      if (j - i >= 0) cur[j] = add(cur[j], prev[j - i]);
      if (x - j <= G && x - j >= 0) cur[j] = add(cur[j], prev[j]);
    }
  }
  for (int i = (0); i <= (R); i++) ans = add(ans, cur[i]);
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(10);
  clock_t b = clock();
  int t = 1;
  for (int tt = (1); tt <= (t); tt++) solve(tt);
  clock_t e = clock();
  cerr << (double(e - b) / CLOCKS_PER_SEC) << " sec";
  return 0;
}
