#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
const long long mod = 1000000007;
long long dp[N][N];
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) dp[1][i] = 1;
  for (int i = 2; i <= 2 * m; i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= j; k++) {
        dp[i][j] = (dp[i][j] + dp[i - 1][k]) % mod;
      }
    }
  }
  long long res = 0;
  for (int i = 1; i <= n; i++) {
    res = (res + dp[2 * m][i]) % mod;
  }
  printf("%lld\n", res);
  return 0;
}
