#include <bits/stdc++.h>
using namespace std;
int n, m, dp[15 << 1][1005], s[15 << 1][1005];
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; ++i) s[0][i] = 1;
  for (int i = 1; i <= m << 1; ++i)
    for (int j = 1; j <= n; ++j) {
      dp[i][j] = (dp[i][j] + s[i - 1][j]) % 1000000007;
      s[i][j] = (s[i][j - 1] + dp[i][j]) % 1000000007;
    }
  printf("%d\n", s[m << 1][n]);
  return 0;
}
