#include <bits/stdc++.h>
using num = long long;
using namespace std;
constexpr num MODULO = 1000000000 + 7;
constexpr size_t MAX_N = 1000;
constexpr size_t MAX_M = 10;
constexpr num EMPTY = -10;
constexpr size_t CACHE_SIZE = 20;
vector<vector<vector<num>>> cache;
void init_cache() {
  assert(cache.empty());
  cache.reserve(CACHE_SIZE + 1);
  if (cache.empty()) {
    for (size_t i = 0; i <= CACHE_SIZE; ++i) {
      vector<vector<num>> by_size;
      by_size.reserve(MAX_N + 1);
      for (size_t j = 0; j <= MAX_N; ++j) {
        vector<num> by_min(MAX_N + 1, EMPTY);
        assert(by_min.size() == MAX_N + 1);
        by_size.emplace_back(by_min);
      }
      assert(by_size.size() == MAX_N + 1);
      cache.emplace_back(by_size);
    }
  }
}
num count(const size_t size, const num min, const num max) {
  assert(cache.size() == CACHE_SIZE + 1);
  assert(size > 0);
  assert(max >= min);
  if (size == 1) {
    num res = (max - min + 1) % MODULO;
    return res;
  }
  if (min == max) {
    return 1;
  }
  if (cache.at(size).at(min).at(max) != EMPTY) {
    return cache[size][min][max];
  }
  num res = 0;
  for (num i = min; i <= max; ++i) {
    num temp = count(size - 1, i, max);
    assert(temp < MODULO);
    res += temp;
    res %= MODULO;
  }
  assert(res < MODULO);
  cache.at(size).at(min).at(max) = res;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  init_cache();
  num n;
  size_t m;
  cin >> n >> m;
  const num result = count(m * 2, 1, n);
  assert(result < MODULO);
  cout << result << endl;
  return 0;
}
