#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int dp[1005][13] = {0};
  for (int i = 1; i <= 1000; i++) dp[i][1] = i;
  for (int i = 1; i <= 1000; i++) {
    for (int j = 2; j <= 10; j++)
      dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % 1000000007;
  }
  long long int n, m;
  cin >> n >> m;
  long long int ans = 0;
  for (int i = 1; i <= n; i++) {
    ans += (dp[i][m] * dp[n - i + 1][m] - dp[i - 1][m] * dp[n - i + 1][m]) %
           1000000007;
    ans = (ans + 1000000007) % 1000000007;
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
