You are given two integers n and m. Calculate the number of pairs of arrays (a, b) such that:

  * the length of both arrays is equal to m; 
  * each element of each array is an integer between 1 and n (inclusive); 
  * a_i ≤ b_i for any index i from 1 to m; 
  * array a is sorted in non-descending order; 
  * array b is sorted in non-ascending order. 



As the result can be very large, you should print it modulo 10^9+7.

Input

The only line contains two integers n and m (1 ≤ n ≤ 1000, 1 ≤ m ≤ 10).

Output

Print one integer – the number of arrays a and b satisfying the conditions described above modulo 10^9+7.

Examples

Input


2 2


Output


5


Input


10 1


Output


55


Input


723 9


Output


157557417

Note

In the first test there are 5 suitable arrays: 

  * a = [1, 1], b = [2, 2]; 
  * a = [1, 2], b = [2, 2]; 
  * a = [2, 2], b = [2, 2]; 
  * a = [1, 1], b = [2, 1]; 
  * a = [1, 1], b = [1, 1]. 
#include <bits/stdc++.h>
using namespace std;
long long mod = pow(10, 9) + 7;
class SegTree {
 private:
  int N;
  vector<vector<int> > t;

 public:
  SegTree(int n) {
    this->N = n;
    t.resize(4 * N);
    for (int i = 0; i < 4 * N; i++) t[i].resize(4);
  }
  vector<int> combine(vector<int> left, vector<int> right) {
    vector<int> v;
    v.resize(4);
    v[0] = left[0] + right[0];
    v[1] = max(left[1], left[0] + right[1]);
    v[2] = max(right[2], left[2] + right[0]);
    v[3] = max(max(left[3], right[3]), left[2] + right[1]);
    return v;
  }
  vector<int> make_data(int val) {
    vector<int> v;
    v.resize(4);
    v[0] = val;
    v[1] = v[2] = v[3] = val;
    return v;
  }
  void build(vector<int> &A, int v, int tl, int tr) {
    if (tl == tr)
      t[v] = make_data(A[tl]);
    else {
      int tm = (tl + tr) / 2;
      build(A, v * 2, tl, tm);
      build(A, v * 2 + 1, tm + 1, tr);
      t[v] = combine(t[v * 2], t[v * 2 + 1]);
    }
  }
  vector<int> sum(int v, int tl, int tr, int l, int r) {
    if (r < tl || tr < l)
      return make_data(-100000);
    else if (l <= tl && tr <= r)
      return t[v];
    int tm = (tl + tr) / 2;
    vector<int> p1 = sum(v * 2, tl, tm, l, r);
    vector<int> p2 = sum(v * 2 + 1, tm + 1, tr, l, r);
    return combine(p1, p2);
  }
  void update(int v, int tl, int tr, int pos, int val) {
    if (tl == tr) {
      t[v] = make_data(val);
    } else {
      int tm = (tl + tr) / 2;
      if (tl <= pos && pos <= tm)
        update(v * 2, tl, tm, pos, val);
      else
        update(v * 2 + 1, tm + 1, tr, pos, val);
      t[v] = combine(t[v * 2], t[v * 2 + 1]);
    }
  }
  void show() {
    for (int i = 1; i < t.size(); i++) {
      for (int j = 0; j < 4; j++) cout << t[i][j] << " ";
      cout << endl;
    }
  }
};
long long power(int x, int y, int p) {
  int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long fact[2001] = {0};
void func() {
  fact[0] = 1;
  for (int i = 1; i < 2001; i++) {
    fact[i] = ((fact[i - 1] % mod) * (i % mod)) % mod;
  }
}
long long power(long long x, long long y) {
  long long ans = 1;
  while (y > 0) {
    if (y % 2 == 1) ans = ((ans % mod) * (x % mod)) % mod;
    y /= 2;
    x = ((x % mod) * (x % mod)) % mod;
  }
  return ans % mod;
}
long long ncr(long long n, long long r) {
  if (n < r) return 0;
  long long temp1 = fact[n];
  long long temp2 = ((fact[n - r] % mod) * (fact[r] % mod)) % mod;
  temp2 = power(temp2, mod - 2);
  temp1 = (temp1) * (temp2);
  temp1 = temp1 % mod;
  return temp1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  func();
  long long n, m;
  cin >> n >> m;
  vector<long long> v1, v2;
  for (int i = 1; i <= n; i++) {
    long long temp = ncr(m - 1 + i - 1, i - 1);
    v1.push_back(temp);
  }
  for (int i = n - 1; i >= 0; i--) {
    v2.push_back(v1[i]);
  }
  for (int i = n - 2; i >= 0; i--) {
    v2[i] += v2[i + 1];
    v2[i] = v2[i] % mod;
  }
  long long ans = 0;
  for (int i = 0; i < n; i++) {
    ans += ((v1[i]) * (v2[i])) % mod;
    ans = ans % mod;
  }
  cout << ans << endl;
}
