#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n, m, i, j;
  cin >> n >> m;
  m *= 2;
  long long int arr[m][n];
  for (i = 0; i < m; i++)
    for (j = 0; j < n; j++)
      if (i == 0 || j == 0)
        arr[i][j] = j + 1;
      else
        arr[i][j] = (arr[i][j - 1] + arr[i - 1][j]) % (1000000007);
  cout << arr[m - 1][n - 1];
}
