#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int old[200005];
int cur[200005];
void precal(int height, int r, int g) {
  int i, j, h;
  int rest_r, rest_g;
  memset(old, 0, sizeof(old));
  memset(cur, 0, sizeof(cur));
  old[0] = 1;
  for (h = 1; h <= height; h++) {
    memset(cur, 0, sizeof(cur));
    for (i = 0; i <= r; i++) {
      rest_r = r - i;
      rest_g = g - (h * (h - 1) / 2 - i);
      if (rest_r >= h) {
        cur[i + h] = (cur[i + h] + old[i]) % MOD;
      }
      if (rest_g >= h) {
        cur[i] = (cur[i] + old[i]) % MOD;
      }
    }
    memcpy(old, cur, sizeof(cur));
  }
  int sum = 0;
  for (int i = 0; i <= r; i++) {
    sum = (sum + old[i]) % MOD;
  }
  printf("%d\n", sum);
}
int main() {
  int r, g;
  scanf("%d %d", &r, &g);
  int max_height = 0;
  int ii, gg;
  for (int i = 1; i <= 900; i++) {
    if (i * (i + 1) > 2 * (r + g)) {
      break;
    }
    max_height = i;
  }
  precal(max_height, r, g);
  return 0;
}
