#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
long long int binpow(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
vector<long long int> fact, fact_inverse;
template <typename type>
void tabulate(type n) {
  fact.resize(n + 1);
  fact_inverse.resize(n + 1);
  fact[0] = 1;
  fact_inverse[0] = binpow(1, mod - 2, mod);
  for (int i = 1; i < n + 1; i++) {
    fact[i] = fact[i - 1] * i;
    fact[i] %= mod;
    fact_inverse[i] = binpow(fact[i], mod - 2, mod);
  }
}
template <typename type>
long long int nCk(type n, type k) {
  return (((fact[n] * fact_inverse[n - k]) % mod) * fact_inverse[k]) % mod;
}
template <typename type>
long long int nPk(const int n, const int k) {
  return (fact[n] * fact_inverse[n - k]) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, n, k, a, b, m;
  cin >> n >> m;
  tabulate(n + m);
  long long int ans = 0;
  for (int i = 1; i <= n; i++) {
    a = nCk(i + m - 2, m - 1);
    b = nCk(n + m - i, m);
    ans += (a * b) % mod;
  }
  ans %= mod;
  cout << ans << "\n";
  return 0;
}
