#include <bits/stdc++.h>
using namespace std;
long long n, m, result;
long long sum;
long long num;
long long nCrModpDP(long long n, long long r, long long p) {
  long long C[r + 1];
  memset(C, 0, sizeof(C));
  C[0] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = min(i, r); j > 0; j--) C[j] = (C[j] + C[j - 1]) % p;
  }
  return C[r];
}
long long nCrModpLucas(long long n, long long r, long long p) {
  if (r == 0) return 1;
  long long ni = n % p, ri = r % p;
  return (nCrModpLucas(n / p, r / p, p) * nCrModpDP(ni, ri, p)) % p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m;
  sum = 2 * m;
  num = n + 2 * m - 1;
  cout << nCrModpLucas(num, sum, 1000000007);
  ;
  return 0;
}
