#include <bits/stdc++.h>
using namespace std;
int n, m;
const int mod = 1e9 + 7;
int64_t dp[1005][25];
int64_t f(int i, int j) {
  if (j == (2 * m)) return 1;
  if (i > n) return 0;
  if (dp[i][j] != -1) return dp[i][j];
  int64_t ans = f(i + 1, j);
  ans = (ans + f(i, j + 1)) % mod;
  return dp[i][j] = ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  for (int i = 0; i < 1005; ++i) {
    for (int j = 0; j < 25; ++j) {
      dp[i][j] = -1;
    }
  }
  cin >> n >> m;
  cout << f(1, 0) << endl;
  return 0;
}
