#include <bits/stdc++.h>
using namespace std;
int a[11][1005], b[11][1005];
int n, m;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) a[1][i] = 1;
  for (int i = 2; i <= m; i++)
    for (int j = 1; j <= n; j++)
      a[i][j] = (a[i][j - 1] + a[i - 1][j]) % 1000000007;
  for (int i = 1; i <= n; i++) b[1][i] = 1;
  for (int i = 2; i <= m; i++)
    for (int j = n; j >= 1; j--)
      b[i][j] = (b[i][j + 1] + b[i - 1][j]) % 1000000007;
  int aa = 0;
  for (int i = 1; i <= n; i++) aa = (aa + a[m][i]) % 1000000007;
  long long ans = 0;
  for (int i = n; i >= 1; i--) {
    ans = (ans + (long long)aa * (long long)b[m][i] % 1000000007) % 1000000007;
    aa = aa >= a[m][i] ? aa - a[m][i] : 1000000007 - a[m][i] + aa;
  }
  cout << ans;
  return 0;
}
