#include <bits/stdc++.h>
using namespace std;
int t, n, m;
long long f[11][1010], g[11][1010], ans;
int main() {
  scanf("%d%d", &n, &m);
  f[0][1] = g[0][n] = 1;
  for (int i = 1; i <= m; i++)
    for (int x = 1; x <= n; x++)
      for (int y = 1; y <= n; y++) {
        if (y <= x) f[i][x] += f[i - 1][y];
        if (y >= x) g[i][x] += g[i - 1][y];
        f[i][x] %= 1000000007;
        g[i][x] %= 1000000007;
      }
  for (int i = 1; i <= n; i++)
    for (int j = i; j <= n; j++) ans = (ans + f[m][i] * g[m][j]) % 1000000007;
  printf("%lld", ans);
}
