#include <bits/stdc++.h>
using namespace std;
const long long N = 3e3 + 8, Mod = 1e9 + 7;
long long n, m, C[N][N];
void prepro() {
  C[1][0] = C[1][1] = 1;
  for (long long i = 2; i < N; i++)
    for (long long j = 0; j <= i; j++)
      C[i][j] = ((C[i - 1][j] % Mod) + (C[i - 1][j - 1] % Mod)) % Mod;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  prepro();
  cin >> n >> m;
  cout << C[n - 1 + (2 * m)][n - 1] % Mod;
}
