#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll f[1000001];
ll power(ll a, ll n) {
  ll res = 1;
  while (n) {
    if (n % 2 == 1) {
      res = (res % 1000000007) * (a % 1000000007) % 1000000007;
      n--;
    } else {
      a = (a % 1000000007) * (a % 1000000007) % 1000000007;
      n = n / 2;
    }
  }
  return res;
}
ll C(ll n, ll k) {
  if (k > n) return 0;
  ll res = f[n];
  res = (res * power(f[k], 1000000007 - 2)) % 1000000007;
  res = (res * power(f[n - k], 1000000007 - 2)) % 1000000007;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  f[0] = f[1] = 1;
  for (ll i = 1; i <= 1000000; i++) {
    f[i] = (f[i - 1] * i) % 1000000007;
  }
  ll n, m;
  cin >> n >> m;
  cout << C(2 * m + n - 1, n - 1) << endl;
}
