#include <bits/stdc++.h>
using namespace std;
void ac() { cout << "YES" << endl; }
void wa() { cout << "NO" << endl; }
const long long maxm = 1e3 + 5;
const long long mod = 1e9 + 7;
long long a[15][maxm];
long long b[15][maxm];
signed main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    a[1][i] = 1;
  }
  for (long long i = 2; i <= m; i++) {
    for (long long j = 1; j <= n; j++) {
      for (long long k = 1; k <= j; k++) {
        a[i][j] += a[i - 1][k] * (j - k + 1) % mod;
        a[i][j] %= mod;
      }
    }
  }
  long long ans = 0;
  for (long long i = 1; i <= n; i++) {
    ans += a[m][i] * (n - i + 1) % mod;
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
