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]. 
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author KharYusuf
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTwoArrays solver = new CTwoArrays();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTwoArrays {
        final long mod = (long) 1e9 + 7;

        public void solve(int testNumber, FastReader s, PrintWriter w) {
            int n = s.nextInt(), m = s.nextInt(), to = n * m + 1;
            long ans = 0;
            bit[][] tot = new bit[n][m];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) tot[i][j] = new bit(i + 1);
                tot[i][0].modify(0, 1);
                for (int j = 1; j < m; j++) {
                    for (int k = 0; k <= i; k++) {
                        tot[i][j].modify(k, tot[i][j - 1].query(k));
                    }
                }
            }
            for (int i = 0; i < n; i++) {
                for (int j = 0; j <= i; j++) {
                    ans += (tot[n - i - 1][m - 1].query(n - i - 1) * tot[j][m - 1].query(j));
                    ans %= mod;
                }
            }
            w.println(ans);
        }

        public class bit {
            public int n;
            public long[] t;

            public bit(int n) {
                t = new long[n + 1];
                this.n = n;
            }

            public void modify(int ind, long val) {
                ind++;
                while (ind <= n) {
                    t[ind] += val;
                    t[ind] %= mod;
                    ind += ind & (-ind);
                }
            }

            public long query(int ind) {
                ind++;
                long sum = 0;
                while (ind > 0) {
                    sum += t[ind];
                    sum %= mod;
                    ind -= ind & (-ind);
                }
                return sum;
            }

        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {

            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {

                curChar = 0;

                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }

            return buf[curChar++];
        }

        public int nextInt() {

            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();

                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public boolean isSpaceChar(int c) {

            if (filter != null)
                return filter.isSpaceChar(c);

            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

