#include <bits/stdc++.h>
using namespace std;
int n, m;
int f[1011][1011];
const int mod = 1e9 + 7;
int main() {
  scanf("%d%d", &n, &m);
  m <<= 1;
  for (int j = 1; j <= n; j++) f[0][j] = 1;
  for (int i = 1; i <= m; i++) {
    f[i][1] = 1;
    for (int j = 2; j <= n; j++) f[i][j] = (f[i - 1][j] + f[i][j - 1]) % mod;
  }
  printf("%d\n", f[m][n]);
  return 0;
}
