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;
void pv(vector<long long> v) {
  for (long long i = 0; i < v.size(); ++i) {
    cout << v[i] << " ";
  }
  cout << "" << endl;
}
void pa(long long a[], long long n, long long p) {
  for (long long i = p; i < n + p; ++i) {
    cout << a[i] << " ";
  }
  cout << "" << endl;
}
const double pi = 3.141592653589793238;
const long long inf = 1000000;
long long dp[1005][1005][11];
void solve() {
  long long n, m;
  cin >> n >> m;
  memset(dp, 0, sizeof(dp));
  for (long long i = (long long)1; i <= (long long)m; i += (long long)1) {
    if (i == 1)
      for (long long j = (long long)n; j >= (long long)1; j -= (long long)1) {
        for (long long k = (long long)n; k >= (long long)1; k -= (long long)1) {
          if (j >= k)
            dp[j][k][i] = 1;
          else
            dp[j][k][i] = 0;
        }
      }
    else {
      for (long long j = (long long)n; j >= (long long)1; j -= (long long)1) {
        for (long long k = (long long)n; k >= (long long)1; k -= (long long)1) {
          dp[j][k][i] = dp[j][k][i - 1];
        }
      }
    }
    if (i == m) break;
    for (long long j = (long long)1; j <= (long long)n; j += (long long)1) {
      for (long long k = (long long)n; k >= (long long)1; k -= (long long)1) {
        if (j == 1) {
          dp[j][k][i] += dp[j][k + 1][i];
          dp[j][k][i] %= 1000000007;
        } else if (k == n) {
          dp[j][k][i] += dp[j - 1][k][i];
          dp[j][k][i] %= 1000000007;
        } else {
          dp[j][k][i] +=
              dp[j - 1][k][i] + dp[j][k + 1][i] - dp[j - 1][k + 1][i];
          dp[j][k][i] %= 1000000007;
        }
      }
    }
  }
  long long ans = 0;
  for (long long i = (long long)1; i <= (long long)n; i += (long long)1)
    for (long long j = (long long)1; j <= (long long)n; j += (long long)1) {
      ans += dp[i][j][m];
      ans %= 1000000007;
    }
  cout << ans << endl;
}
int32_t main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
}
