#include <bits/stdc++.h>
using namespace std;
int dp[11][1010], n, m;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) dp[1][i] = 1;
  for (int i = 2; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      for (int k = 1; k <= j; k++) {
        dp[i][j] += dp[i - 1][k];
        if (dp[i][j] >= 1000000007) dp[i][j] -= 1000000007;
      }
    }
  }
  int ans = 0;
  for (int x_1 = 1; x_1 <= n; x_1++) {
    for (int x_2 = 1; x_2 <= n - x_1 + 1; x_2++) {
      ans += (1LL * dp[m][x_1] * dp[m][x_2]) % 1000000007;
      if (ans >= 1000000007) ans -= 1000000007;
    }
  }
  printf("%d\n", ans);
  return 0;
}
