#include <bits/stdc++.h>
constexpr int MOD = 1e9 + 7;
std::ostream& operator<<(std::ostream& os, const std::vector<int>& vector) {
  for (int x : vector) {
    os << x << ' ';
  }
  return os;
}
int solve(int red_count, int green_count) {
  int level_count = (std::sqrt(8 * (red_count + green_count) + 1) - 1) / 2;
  std::vector<int> level(red_count + 1);
  level[0] = 1;
  for (int i = 1; i <= level_count; ++i) {
    int total_count = i * (i + 1) / 2;
    std::vector<int> next_level(red_count + 1);
    for (int j = std::max(0, total_count - green_count);
         j <= std::min(total_count, red_count); ++j) {
      next_level[j] = level[j];
      if (i <= j) {
        next_level[j] = (next_level[j] + level[j - i]) % MOD;
      }
    }
    level = std::move(next_level);
  }
  int result = 0;
  for (auto x : level) {
    result = (result + x) % MOD;
  }
  return result;
}
int main() {
  std::ios::sync_with_stdio(false);
  int red_count, green_count;
  std::cin >> red_count >> green_count;
  std::cout << solve(red_count, green_count) << '\n';
  return 0;
}
