#include <bits/stdc++.h>
using namespace std;
long long int dp[1001][1001][11];
long long int dpi[1001][1001][11];
long long int dpj[1001][1001][11];
int32_t main() {
  long long int n, m;
  cin >> n >> m;
  dp[1][1][1] = 1;
  for (long long int i = 0; i <= n; i++) {
    for (long long int j = 0; j <= n; j++) {
      for (long long int k = 0; k <= m; k++) {
        dpj[i][j][k] = dpi[i][j][k] = dp[i][j][k] = 0;
      }
    }
  }
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = i; j <= n; j++) {
      dp[i][j][1] = 1;
    }
  }
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = i; j <= n; j++) {
      dpi[i][j][1] = dpi[i - 1][j][1] % 1000000007 + dp[i][j][1] % 1000000007;
      dpj[i][j][1] = dpj[i][j - 1][1] % 1000000007 + dpi[i][j][1] % 1000000007;
      dpi[i][j][1] %= 1000000007;
      dpj[i][j][1] %= 1000000007;
    }
  }
  for (long long int k = 2; k <= m; k++) {
    for (long long int i = 1; i <= n; i++) {
      for (long long int j = i; j <= n; j++) {
        dp[i][j][k] += (dpj[i][n][k - 1] - dpj[i][j - 1][k - 1]) % 1000000007;
        dpi[i][j][k] = dpi[i - 1][j][k] % 1000000007 + dp[i][j][k] % 1000000007;
        dpj[i][j][k] =
            dpj[i][j - 1][k] % 1000000007 + dpi[i][j][k] % 1000000007;
        dp[i][j][k] %= 1000000007;
        dpi[i][j][k] %= 1000000007;
        dpj[i][j][k] %= 1000000007;
      }
    }
  }
  long long int ans = 0;
  for (long long int i = 1; i <= n; i++) {
    for (long long int j = i; j <= n; j++) {
      ans += dp[i][j][m];
      ans %= 1000000007;
    }
  }
  cout << (ans + 1000000007) % 1000000007 << '\n';
}
