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.util.*;
import java.io.*;


public class a {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solver solver = new Solver();
        int t =1 ;
        // t = in.nextInt();
        solver.solve(t, in, out);
        out.close();
    }
 
    static class Solver {
        public void solve(int testNumber, InputReader sc, PrintWriter out) {
        while(testNumber-->0)
        {      
            int n = sc.nextInt();
            int m = sc.nextInt();
            long mod = 1000000007;
            long[][] dpA = new long[n+1][m+1];
            long[][] dpB = new long[n+1][m+1];
            for(int i =1;i<=m;i++)
            {
                dpA[1][i] =1;
                dpB[1][i] =1;
            }
            for(int i =1;i<=n;i++)
            {
                dpA[i][1] =1;
                dpB[i][1] =1;
            }
            for(int i = 2;i<=n;i++){
                for(int j = 1;j<=m;j++)
                    dpA[i][j] = (dpA[i-1][j]+dpA[i][j-1])%mod;
            }
            long ans = 0;
            for(int valueAtB = n;valueAtB>=1;valueAtB--){
                // int i = n-i+1;
                long sum = 0;
                for(int i =1;i<=valueAtB;i++)
                    sum = (sum+dpA[i][m])%mod;
                ans = (ans + (sum*dpA[n-valueAtB+1][m])%mod)%mod; 
            }
            out.println(ans);
        }       
    }

    private static int solve(String in){
        int ans = 0;
        int cnt = 0;
        int[] preSum = new int[in.length()];
        int[] postSum = new int[in.length()];
        for(int i=0;i<in.length();i++)
        {
            if(i==0)
                preSum[i]=in.charAt(i)=='('?1:-1;
            else
            {
                preSum[i] = preSum[i-1] + (in.charAt(i)=='('?1:-1);
            }       
        }
        // for(int x : preSum)
        // {
        //     System.out.print(x +" ");
        // }
        // System.out.println(" -> " + in );
        int postCnt = 0;
        int firstOpenInx = -1;
        for(int i = in.length()-1;i>=0;i--)
        {
            if(in.charAt(i) == '(')
                postCnt++;
            else 
                postCnt--;
            int preCnt = i>0?preSum[i-1]:0;
            if(postCnt+preCnt == 0)
            {
            System.out.println(i + " -> " + preCnt + " " + postCnt); 
                firstOpenInx = i;
            }
        }
        if(firstOpenInx == -1)
            return 0;
        for(int i=firstOpenInx;i<in.length();i++)
        {
            System.out.println(in + " " + i + " -> " + firstOpenInx);
            if(in.charAt(i) == ')')
                cnt--;
            else
                cnt++;
            if(cnt==0)
                ans++;
        }
        for(int i=0;i<firstOpenInx;i++)
        {
            System.out.println(in + " " + i + " -> " +  firstOpenInx);
            if(in.charAt(i) == ')')
                cnt--;
            else
                cnt++;
            if(cnt==0)
                ans++;
        }
        
        
        return ans++;

    }
    }
 
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 
        public InputReader(InputStream stream) {
            this.stream = stream;
        }
       
        private 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 String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        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 long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long 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 double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }
       
        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));
           
            return res.toString();
        }
     
        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }
     
        public String next() {
            return readString();
        }
       
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}