#include <bits/stdc++.h>
using namespace std;
void in() {}
long long mod = 1e9 + 7;
long long binomialCoeff(int n, int k) {
  long long C[k + 1];
  memset(C, 0, sizeof(C));
  C[0] = 1;
  for (int i = 1; i <= n; i++) {
    for (int j = min(i, k); j > 0; j--) C[j] = (C[j] + C[j - 1]) % mod;
  }
  return C[k] % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  in();
  int n, m;
  cin >> n >> m;
  cout << binomialCoeff(n + 2 * m - 1, 2 * m) << "\n";
}
