#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long N = 1e5 + 5;
long long n, m;
long long fac[N];
long long jvb = 0;
long long power(long long a, long long b) {
  if (b == 0) {
    return 1;
  }
  long long ans = power(a, b / 2);
  ans = ans % mod;
  ans = ans * ans;
  ans = ans % mod;
  if (b % 2 == 1) {
    ans = ans * a;
    ans = ans % mod;
  }
  return ans;
}
long long choose(long long a, long long b) {
  long long t = fac[b];
  t = (t * power(fac[a], mod - 2)) % mod;
  t = (t * power(fac[b - a], mod - 2)) % mod;
  return t;
}
void solver(long long a) {
  long long ans = choose(a - 1, m - 2 + a);
  long long tmp = choose(n - a, m + n - a + 1 - 1);
  ans = ans * tmp;
  ans = ans % mod;
  jvb += ans;
  jvb = jvb % mod;
}
int main() {
  fac[0] = 1;
  for (long long i = 1; i < N; i++) {
    fac[i] = fac[i - 1] * i;
    fac[i] = fac[i] % mod;
  }
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    solver(i);
  }
  cout << jvb << endl;
}
