#include <bits/stdc++.h>
using namespace std;
long long dp[21][1005];
long long recur(int idx, int val) {
  if (dp[idx][val] != -1) return dp[idx][val];
  if (idx == 0) {
    return val;
  }
  if (val == 1) {
    return 1;
  }
  return dp[idx][val] =
             (recur(idx - 1, val) + recur(idx, val - 1)) % 1000000007;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  memset(dp, -1, sizeof(dp));
  cout << recur(2 * m - 1, n);
}
