#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long int dp[1007][11];
long long int cp[1007][11];
void doit(long long int meg) {
  for (long long int i = 0; i < meg; i++) {
    dp[i][0] = 0;
    dp[i][1] = 1;
    cp[i][0] = 0;
    cp[i][1] = 1;
  }
  for (long long int m = 2; m < 11; m++) {
    for (long long int i = 1; i < meg; i++) {
      long long int c = 0;
      for (long long int j = 1; j <= i; j++) {
        c += dp[j][m - 1];
        if (c > mod) c -= mod;
      }
      dp[i][m] = c;
    }
  }
  for (long long int m = 2; m < 11; m++) {
    for (long long int i = meg - 1; i > 0; i--) {
      long long int c = 0;
      for (long long int j = i; j < meg; j++) {
        c += cp[j][m - 1];
        if (c > mod) c -= mod;
      }
      cp[i][m] = c;
    }
  }
}
void solve() {
  long long int n, m;
  cin >> n >> m;
  doit(n + 1);
  long long int ans = 0;
  for (long long int a = 1; a <= n; a++) {
    for (long long int b = a; b <= n; b++) {
      long long int c = dp[a][m];
      c *= cp[b][m];
      c %= mod;
      ans += c;
      if (ans > mod) ans -= mod;
    }
  }
  cout << ans << "\n";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t = 1;
  clock_t launch = clock();
  while (t--) {
    solve();
  }
  clog << ((long double)(clock() - launch) / CLOCKS_PER_SEC) << "\n";
}
