#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
const long long mod = 1e9 + 7;
long long n, m;
long long fac[maxn];
long long ksm(long long a, long long b) {
  long long ans = 1, base = a % mod;
  while (b) {
    if (b & 1) ans = ans * base % mod;
    base = base * base % mod;
    b >>= 1;
  }
  return ans % mod;
}
long long C(int x, int y) {
  return fac[x] * ksm(fac[y] * fac[x - y] % mod, mod - 2) % mod;
}
int main() {
  cin >> n >> m;
  fac[0] = 1;
  for (int i = 1; i <= m * 2 + n + 1; ++i) fac[i] = fac[i - 1] * i % mod;
  cout << C(n + m * 2 - 1, n - 1);
  return 0;
}
