#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
const int mod = 1e9 + 7;
int dp[25][N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) dp[1][i] = 1;
  for (int i = 2; i <= (m << 1); i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = j; k <= n; k++) {
        dp[i][j] += dp[i - 1][k];
        dp[i][j] %= mod;
      }
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += dp[2 * m][i];
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
