#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e3 + 10;
const long long MAXM = 21;
const long long inf = ((-1) * 1e9) - 10;
const long long INF = 1e9 + 10;
const long long MOD = 1e9 + 7;
bool flag;
long long t, n, m, k, l;
long long dp[MAXN][MAXN], ans, cnt;
string s, x, y;
vector<long long> v;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < MAXM; i++) dp[0][i] = 1;
  for (int i = 0; i < MAXN; i++) dp[i][0] = 1;
  for (int i = 1; i < MAXN; i++)
    for (int j = 1; j < MAXM; j++)
      dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % MOD;
  cout << dp[n - 1][2 * m];
  return 0;
}
