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