#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long mod = 1e9 + 7;
long long f[2100], q[2100];
long long pow(long long a, long long b) {
  if (b == 0)
    return 1ll;
  else if (b % 2 == 1)
    return (pow(a, b - 1) % mod * a % mod) % mod;
  else {
    long long g = pow(a, b / 2);
    return (g % mod * g % mod) % mod;
  }
}
long long c(long long n, long long k) {
  return (q[n] % mod * pow(f[k], mod - 2) % mod) % mod;
}
int main() {
  cin >> n >> m;
  f[0] = 1;
  for (long long i = 1; i <= 2000; i++) {
    f[i] = (f[i - 1] * i) % mod;
  }
  q[n] = n;
  for (long long i = n + 1; i <= 2000; i++) {
    q[i] = (q[i - 1] * i) % mod;
  }
  cout << c(n + 2 * m - 1, 2 * m);
  return 0;
}
