#include <bits/stdc++.h>
using namespace std;
static int ans[200001][2];
int main() {
  int t1, t2, r, g;
  cin >> t1 >> t2;
  if (t1 == 0 || t2 == 0) {
    cout << 1 << endl;
    return 0;
  }
  r = min(t1, t2);
  g = max(t1, t2);
  int level = 1;
  while ((level * (level + 1)) / 2 <= (r + g)) level++;
  level--;
  int maxr = r;
  int minr = max(0, (level * (level + 1)) / 2 - g);
  ans[0][0] = 1;
  for (int j = 1; j <= level; j++) {
    for (int i = 0; i <= maxr; i++) {
      if (i == 0)
        ans[i][1] = 1;
      else {
        if (i >= j)
          ans[i][1] = (ans[i - j][0] + ans[i][0]) % 1000000007;
        else
          ans[i][1] = ans[i][0];
      }
    }
    for (int i = 0; i <= maxr; i++) ans[i][0] = ans[i][1];
  }
  int temp = 0;
  for (int i = minr; i <= maxr; i++) temp = (temp + ans[i][0]) % 1000000007;
  cout << temp << endl;
  return 0;
}
