#include <bits/stdc++.h>
const int md = 1000000007;
inline int add(int a, int b) {
  a += b;
  if (a >= md) a -= md;
  return a;
}
inline int sub(int a, int b) {
  a -= b;
  if (a < 0) a += md;
  return a;
}
inline int mul(int a, int b) { return (long long)a * b % md; }
const int N = 1000;
const int M = 10;
int n, m, dp[M + 1][N + 1][N + 1];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= n; ++j) dp[0][i][j] = 1;
  for (int i = 1; i <= m; ++i)
    for (int j = 1; j <= n; ++j)
      for (int k = 1; k <= j; ++k)
        dp[i][j][k] = add(dp[i - 1][j][k], dp[i][j][k - 1]);
  int ans = 0;
  for (int i = 1; i <= n; ++i)
    ans = add(ans, mul(sub(dp[m][i][i], dp[m][i][i - 1]),
                       dp[m][n - i + 1][n - i + 1]));
  printf("%d\n", ans);
  return 0;
}
