#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5, mod = 1e9 + 7;
int dp[maxn][2], ans = 0;
int main() {
  int g, r, h = 0;
  cin >> r >> g;
  while (h * (h + 1) / 2 <= r + g) h++;
  h--;
  dp[0][0] = 1;
  for (int j = 1; j <= h; j++) {
    for (int i = 0; i <= r; i++) {
      dp[i][j % 2] = 0;
      if (j * (j + 1) / 2 - i <= g) {
        dp[i][j % 2] += dp[i][(j + 1) % 2];
      }
      if (i >= j) {
        dp[i][j % 2] += dp[i - j][(j + 1) % 2];
      }
      dp[i][j % 2] %= mod;
    }
  }
  for (int i = 0; i <= r; i++) {
    ans += dp[i][h % 2];
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
