#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e3 + 5;
inline int pls(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int mns(int a, int b) { return a - b < 0 ? a - b + mod : a - b; }
int n, m, f[11][N], g[11][N], ans;
int main(void) {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) f[1][i] = g[1][i] = 1;
  for (int i = 2; i <= m; ++i) {
    for (int j = 1; j <= n; ++j)
      for (int k = j; k <= n; ++k) f[i][j] = pls(f[i][j], f[i - 1][k]);
    for (int j = 1; j <= n; ++j)
      for (int k = j; k; --k) g[i][j] = pls(g[i][j], g[i - 1][k]);
  }
  int S = 0;
  for (int i = n; i; --i) {
    S = pls(S, f[m][i]);
    ans = pls(ans, 1LL * S * g[m][i] % mod);
  }
  cout << ans;
  return 0;
}
