#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;
template <int mod>
struct ModInt {
  int x;
  ModInt() : x(0) {}
  ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
  ModInt operator-() const { return ModInt(-x); }
  ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
  ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
  ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
  ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }
  ModInt operator++() const { return ModInt(*this) += 1; }
  ModInt operator--() const { return ModInt(*this) -= 1; }
  bool operator==(const ModInt &p) const { return x == p.x; }
  bool operator!=(const ModInt &p) const { return x != p.x; }
  bool operator<(const ModInt &p) const { return x < p.x; }
  ModInt &operator+=(const ModInt &p) {
    if ((x += p.x) >= mod) x -= mod;
    return *this;
  }
  ModInt &operator-=(const ModInt &p) {
    if ((x += mod - p.x) >= mod) x -= mod;
    return *this;
  }
  ModInt &operator*=(const ModInt &p) {
    x = (int)(1LL * x * p.x % mod);
    return *this;
  }
  ModInt &operator/=(const ModInt &p) {
    *this *= p.inv();
    return *this;
  }
  friend ostream &operator<<(ostream &os, const ModInt &p) { return os << p.x; }
  friend istream &operator>>(istream &is, ModInt &a) {
    int64_t t;
    is >> t;
    a = ModInt<mod>(t);
    return (is);
  }
  ModInt pow(int64_t N) const {
    ModInt res(1), mult(x);
    while (N > 0) {
      if (N & 1) res *= mult;
      mult *= mult;
      N >>= 1;
    }
    return res;
  }
  ModInt inv() const {
    int a = x, b = mod, u = 1, v = 0, t;
    while (b > 0) {
      t = a / b;
      a -= t * b, u -= t * v;
      swap(a, b), swap(u, v);
    }
    return ModInt(u);
  }
};
const int64_t mod1 = 1000000007;
const int64_t mod2 = 998244353;
using mint = ModInt<mod1>;
mint frac(mint N) {
  mint res = 1;
  for (mint i = 1; i < N + 1; i += 1) {
    res *= i;
  }
  return res;
}
int main() {
  mint N, M;
  cin >> N >> M;
  mint ans = frac((mint)2 * M + N - 1) / frac((mint)2 * M) / frac(N - 1);
  cout << ans << "\n";
}
