#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
long long int modinv(long long int inv, long long int mod) {
  if (inv >= 0)
    inv = inv % mod;
  else
    inv = mod - ((0 - inv) % mod);
  pair<long long int, long long int> mnc(make_pair(1, 0)), mxc(make_pair(0, 1));
  long long int min = inv;
  long long int max = mod;
  while (min > 1) {
    long long int fac = max / min;
    pair<long long int, long long int> temp = mnc;
    mnc.first = mxc.first - fac * mnc.first;
    mnc.second = mxc.second - fac * mnc.second;
    mxc = temp;
    max = max % min;
    swap(min, max);
  }
  if (mnc.first >= 0)
    return mnc.first;
  else
    return mod - ((0 - mnc.first) % mod);
}
int main() {
  long long int n, m;
  cin >> n >> m;
  n = 2 * m + n - 1;
  m *= 2;
  long long int ans = 1;
  for (long long int i = 0; i < m; i++)
    ans = ans * (n - i) % mod * modinv(i + 1, mod) % mod;
  cout << ans << endl;
}
