#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 5;
class cmp {
 public:
  cmp() {}
  bool operator()(const pair<int, int>& p1, const pair<int, int>& p2) const {
    if (p1.first == p2.first)
      return p1.second > p2.second;
    else
      return (p1.first < p2.first);
  }
};
int mod = 1e9 + 7;
int n, m;
int dp[1003][1004];
int solve(int i, int prev) {
  if (i == m * 2) return 1;
  if (dp[i][prev] != -1) return dp[i][prev];
  int ans = 0;
  for (int ii = max(1, prev); ii <= n; ii++)
    ans = ((ans % mod) + (solve(i + 1, ii) % mod)) % mod;
  return dp[i][prev] = ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  memset(dp, -1, sizeof dp);
  cin >> n >> m;
  cout << solve(0, 0);
  return 0;
}
