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]. 
from sys import stdin 
n, m = (int(v) for v in stdin.readline().split())
# print(n, m)

MODULUS = 10**9 + 7
mod = lambda x: x % MODULUS

# first count the number of nondescending arrays
# of j integers from 1..i, for all 1 <= i <= n and 0 <= j <= m
# for i = 1, there is always only one array
nondesc_count = [1] * (m + 1)

# actually, we will need the number of nondescending arrays
# of at most m-1 integers from 1..i for all 1 <= i <= n
nondesc_count_sum = [None] * (n + 1)

# for i = 1, they are [], [1], ..., [1] * (m - 1)
# m different arrays
nondesc_count_sum[1] = m

# compute for i -> i + 1
for i in range(1, n):
    nondesc_count_next = [None] * (m + 1)
    # for any i, only one array with size 0
    nondesc_count_next[0] = 1
    # for a size j, the count for limit i + 1
    # is the sum of all counts for sizes 0..j, for limit i
    for j in range(1, m + 1):
        nondesc_count_next[j] = mod(  nondesc_count_next[j - 1] 
                                    + nondesc_count[j])
    # sum counts from 0 .. m - 1 to count upto length m - 1 as desired
    nondesc_count_sum[i + 1] = sum(nondesc_count_next[j]
                                   for j in range(m))
    #print("i =", i + 1, nondesc_count_next, nondesc_count_sum[i + 1])
    nondesc_count = nondesc_count_next


# count the number of pairs of arrays satisfying the problem conditions
# where for the current i, pair_count[j] is the number of such arrays
# that has the first j values of the second array restricted to only i
# all other positions can have values from 1..i
# track this count for all j in 0..m

# start with i = 1 (one pair independent of restrictions)
pair_count = [1] * (m + 1)

# compute for i -> i + 1
for i in range(1, n):
    pair_count_next = [None] * (m + 1)
    # compute for each j (restriction length on second array)
    for j in range(0, m + 1):
        count = 0
        # count pairs where the first array does not contain
        # the value i+1 and the first k values of the second array
        # are i+1. k must be at least j to fulfill the restriction.
        # for each k, the count is the same as the count for i
        # when having restriction k
        for k in range(j, m + 1):
            count = mod(count + pair_count[k])
        # count pairs where the second aray is completely filled
        # with i+1, and the last 1 upto m (all) elements of the
        # first array are filled with i+1
        count = mod(count + nondesc_count_sum[i])
        pair_count_next[j] = count
    #print("i = ", i + 1, pair_count_next)
    pair_count = pair_count_next

# final count: i = n, no restriction
print(pair_count[0])
        
