#include <bits/stdc++.h>
using namespace std;
int n, m;
const int maxn = 1000005;
const int M = 1000000007;
int dp[maxn];
int main() {
  int i, j, k;
  int g, r;
  while (scanf("%d%d", &r, &g) == 2) {
    int h = 10000;
    while (h * (h + 1) > 2 * (g + r)) h--;
    for (i = 0; i <= (g + r) - h * (h + 1) / 2; i++) dp[i] = 1;
    for (i = 1; i <= h; i++) {
      for (j = r - i; j >= 0; j--) {
        dp[i + j] = (dp[i + j] + dp[j]) % M;
      }
    }
    printf("%d\n", dp[r]);
  }
}
