#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxm = 1e4 + 5;
long long fac[maxm];
long long ppow(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = ans * a % mod;
    }
    a = a * a % mod;
    b >>= 1;
  }
  return ans;
}
long long C(long long n, long long m) {
  if (m > n || m < 0) return 0;
  long long up = fac[n];
  long long down = fac[m] * fac[n - m] % mod;
  return up * ppow(down, mod - 2) % mod;
}
signed main() {
  fac[0] = 1;
  for (long long i = 1; i < maxm; i++) {
    fac[i] = fac[i - 1] * i % mod;
  }
  long long n, m;
  cin >> n >> m;
  cout << C(n + 2 * m - 1, n - 1);
  return 0;
}
