#include <bits/stdc++.h>
using namespace std;
int m, n;
map<pair<int, int>, int> dp;
int getans(int remb, int curr) {
  if (curr == n || remb == 0) return 1;
  int ret = 0;
  if (dp.find(make_pair(remb, curr)) != dp.end())
    return dp[make_pair(remb, curr)];
  if (remb == 1) {
    return n - curr + 1;
  }
  ret = (getans(remb - 1, curr) + getans(remb, curr + 1)) % 1000000007;
  dp[make_pair(remb, curr)] = ret;
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  ;
  cin.tie(NULL);
  int t = 1;
  while (t--) {
    dp.clear();
    cin >> n >> m;
    cout << getans(2 * m, 1);
  }
  return 0;
}
