#include <bits/stdc++.h>
using namespace std;
long long n, m, dp[1001][1001], dp_new[1001][1001], sm[1001][1001];
signed main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (long long l = 1; l < m + 1; l++) {
    for (long long i = 1; i < n + 1; i++) {
      for (long long j = 1; j < i + 1; j++) {
        if (l == 1) {
          dp[i][j] = 1;
          continue;
        }
        dp[i][j] = sm[i][j];
      }
    }
    for (long long i = n; i >= 1; i--) {
      for (long long j = 1; j <= i; j++) {
        sm[i][j] = sm[i][j - 1] + dp[i][j];
        sm[i][j] %= 1000000007;
      }
    }
    for (long long i = n; i >= 1; i--) {
      for (long long j = 1; j <= i; j++) {
        sm[i][j] += sm[i + 1][j];
        sm[i][j] %= 1000000007;
      }
    }
  }
  long long ans = 0;
  for (long long i = 1; i < n + 1; i++) {
    for (long long j = 1; j <= i; j++) {
      ans += dp[i][j];
      ans %= 1000000007;
    }
  }
  cout << ans << '\n';
}
