#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long dp[1002][1002][11], i, j, k, spart[1002][1002], s;
void functie() {
  for (i = 1; i <= n; i++) {
    for (j = i; j <= n; j++) cout << spart[i][j] << " ";
    cout << "\n";
  }
}
const int K = 1000000007;
int main() {
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    for (j = i; j <= n; j++) dp[i][j][1] = 1;
  }
  for (k = 2; k <= m; k++) {
    for (i = 1; i <= n; i++)
      for (j = n; j >= i; j--)
        spart[i][j] = K + spart[i - 1][j] % K + spart[i][j + 1] % K -
                      spart[i - 1][j + 1] % K + dp[i][j][k - 1] % K;
    for (i = 1; i <= n; i++) {
      for (j = n; j >= i; j--) {
        dp[i][j][k] = spart[i][j] % K;
      }
    }
  }
  for (i = 1; i <= n; i++)
    for (j = i; j <= n; j++) s += dp[i][j][m] % K;
  cout << s % K;
}
