#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, m;
long long dp[25][1005];
int main() {
  cin >> n >> m;
  m <<= 1;
  for (register int i = 0; i <= n; i++) {
    dp[0][i] = 1;
  }
  for (register int i = 1; i <= m; i++) {
    for (register int j = 1; j <= n; j++) {
      dp[i][j] += (dp[i - 1][j] + dp[i][j - 1]);
      dp[i][j] %= 1000000007;
    }
  }
  printf("%lld\n", dp[m][n]);
  return 0;
}
