#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long q[1007][15];
int main() {
  int n, m;
  long long an = 0;
  cin >> n >> m;
  for (int i = 0; i < 15; i++) q[1][i] = 1;
  for (int i = 0; i < 1005; i++) q[i][0] = 1;
  for (int x = 2; x <= 1005; x++)
    for (int y = 1; y <= 10; y++) {
      q[x][y] = (q[x - 1][y] + q[x][y - 1]) % mod;
    }
  for (int i = 1; i <= n; i++) an += (q[i][m - 1] * q[n - i + 1][m]) % mod;
  cout << an % mod << endl;
  return 0;
}
