#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
long long way(int len, int num) {
  vector<vector<long long>> map(len, vector<long long>(num, 0));
  for (int len_index = 0; len_index < len; ++len_index) {
    for (int num_index = 0; num_index < num; ++num_index) {
      if (len_index == 0)
        map[len_index][num_index] = 1;
      else if (num_index == 0)
        map[len_index][num_index] = len_index + 1;
      else {
        long long map_item =
            map[len_index - 1][num_index] + map[len_index][num_index - 1];
        if (map_item >= (long long)(1e9 + 9)) {
          map_item = map_item % (long long)(1e9 + 7);
        }
        map_item %= (long long)(10e9) + 7;
        map[len_index][num_index] = map_item;
      }
    }
  }
  return map[len - 1][num - 1];
}
int main() {
  int n, m;
  cin >> n >> m;
  cout << way(n, 2 * m);
  return 0;
}
