#include <bits/stdc++.h>
using namespace std;
int f[211111] = {1}, ans;
int main() {
  int i, j, n, m, h;
  cin >> n >> m;
  for (h = 1; h * (h + 1) / 2 <= n + m; h++)
    ;
  h--;
  for (i = 1; i <= h; i++)
    for (j = n; j >= i; j--) f[j] = (f[j] + f[j - i]) % 1000000007;
  for (j = max(0, h * (h + 1) / 2 - m); j <= n; j++)
    ans = (ans + f[j]) % 1000000007;
  cout << ans;
}
