#include <bits/stdc++.h>
using namespace std;
long long ar[1005][20];
int main() {
  long long i, j, k, l, m, n, o, p, q, tst, csin = 0;
  cin >> n >> m;
  for (i = 1; i <= n; i++) ar[i][1] = 1;
  for (i = 2; i <= 2 * m; i++) {
    p = 0;
    for (j = 1; j <= n; j++) {
      ar[j][i] = (ar[j - 1][i] + ar[j][i - 1]) % (long long)(1e9 + 7);
    }
  }
  p = 0;
  for (i = 1; i <= n; i++) {
    p = (p + ar[i][2 * m]) % (long long)(1e9 + 7);
  }
  cout << p << '\n';
  return 0;
}
