#include <bits/stdc++.h>
using namespace std;
const int mx = 1e3 + 100, M = 1e9 + 7;
long long int n, m, d[mx][mx];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  d[0][0] = 1;
  for (int i = 1; i < mx; i++) {
    d[i][0] = 1;
    for (int j = 1; j < i + 1; j++)
      d[i][j] = (d[i - 1][j - 1] + d[i - 1][j]) % M;
  }
  cout << d[(m * 2) + (n - 1)][(n - 1)] << endl;
  return 0;
}
