#include <bits/stdc++.h>
using namespace std;
const long long D = 1000 * 1000 * 1000 + 7;
long long dp[23][1003], ans;
int32_t main() {
  long long n, m;
  cin >> n >> m;
  dp[0][0] = 1;
  for (long long i = 1; i <= 2 * m; i++)
    for (long long j = 0; j < n; j++)
      for (long long k = 0; k <= j; k++)
        dp[i][j] = (dp[i][j] + dp[i - 1][k]) % D;
  for (long long i = 0; i < n; i++) ans = (ans + dp[2 * m][i]) % D;
  cout << ans;
  return 0;
}
