#include <bits/stdc++.h>
using namespace std;
const unsigned long long MOD = 1000000007;
unsigned long long dp[1005][30];
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 1; i <= N; i++) dp[i][1] = 1;
  for (int m = 2; m <= 2 * M; m++) {
    for (int n = 1; n <= N; n++) {
      for (int i = n; i <= N; i++) {
        dp[n][m] += dp[i][m - 1] % MOD;
      }
    }
  }
  unsigned long long ans = 0;
  for (int i = 1; i <= N; i++) {
    ans += dp[i][2 * M];
    ans %= MOD;
  }
  cout << ans;
}
