#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
const bool db = false;
int r, g, levels;
int dp[2][200010];
int as, ds, qqq;
int main() {
  cin >> r >> g;
  while (levels * (levels + 1) / 2 <= r + g) ++levels;
  --levels;
  dp[0][0] = 1;
  for (int i = 1; i <= levels; ++i) {
    int pr = i & 1;
    memset(dp[pr], 0, sizeof(dp[pr]));
    for (int R = 0; R <= r; ++R) {
      int G = i * (i - 1) / 2 - R;
      if (G + i <= g) dp[pr][R] = (dp[!pr][R] + dp[pr][R]) % 1000000007;
      if (R + i <= r) dp[pr][R + i] = (dp[pr][R + i] + dp[!pr][R]) % 1000000007;
    }
  }
  int ans = 0;
  for (int i = 0; i <= r; ++i) ans = (ans + dp[levels & 1][i]) % 1000000007;
  cout << ans << endl;
  return 0;
}
