#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const int MOD1 = 1e9 + 7, MOD2 = 1e9 + 9;
const int N = 2e5 + 10;
int r, g, hmx = 0, dp[2][N];
int G(int x) { return x * (x + 1) / 2; }
int main() {
  scanf("%d%d", &r, &g);
  while (G(hmx) <= r + g) hmx++;
  hmx--;
  for (int i = hmx + 1; i >= 1; i--) {
    for (int curr = 0; curr <= r; curr++) {
      if (i == hmx + 1)
        dp[i % 2][curr] = 1;
      else {
        int tot = G(i - 1);
        int gl = g - (tot - (r - curr));
        dp[i % 2][curr] = 0;
        if (curr >= i) dp[i % 2][curr] += dp[!(i % 2)][curr - i];
        if (gl >= i) dp[i % 2][curr] += dp[!(i % 2)][curr];
        dp[i % 2][curr] %= MOD1;
      }
    }
  }
  printf("%d\n", dp[1][r]);
}
