#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
double pi = 3.14159265;
vector<vector<int> > dp(1001, vector<int>(11, -1));
long long fun(int n, int m) {
  if (dp[n][m] != -1) return dp[n][m];
  if (m == 0 || n == 1)
    return 1;
  else
    return dp[n][m] = (fun(n, m - 1) + fun(n - 1, m)) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    ans = ans + (fun(i, m - 1) * fun(n - i + 1, m)) % mod;
  }
  cout << ans % mod;
  return 0;
}
