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.*;
	import java.math.*;
	import java.awt.geom.*;
	 
	import static java.lang.Math.*;
	 
	 public class Solution implements Runnable {
		
		 long mod1=(long)1e9+7;
		 int mod2=998244353;
	     
		 public void solve() throws Exception {
//			 int t=sc.nextInt();
//			while(t-->0)
//			{
			 int n=sc.nextInt();int m=sc.nextInt();
			 long sum=0l;
			 if(m==1)
			 {
				 out.println(n%mod1*(n+1)%mod1/2);
				 return;
			 }
			 
			 long arr[]=new long[1020];
			 for(int i=1;i<=n+m;i++)
			 {
				 arr[i]=ncr(i,m-1,mod1);
			 }
			 
				 for(int j=1;j<=n;j++)
				 {
					 for(int k=j;k<=n;k++)
					 {
					 sum=sum+(arr[j+m-2])%mod1*(arr[n-k+m-1])%mod1;
					 sum%=mod1;
					//out.println(j+" "+k+" "+(power((long)j,m-1,mod1)%mod1*power((long)n-k+1,m-1,mod1)%mod1)%mod1);
					 }
				 }
			 
			 out.println(sum%mod1);
				
				
				
			
		 
		 }
		 
		 static long ncr(int n, int r, long p) 
		    { 
			 if(r>n)
				 return 0l;
		        if (r > n - r) 
		            r = n - r; 
		  
		        long C[] = new long[r + 1]; 
		  
		        C[0] = 1; 
		  
		        for (int i = 1; i <= n; i++) { 
		  
		            for (int j = Math.min(i, r); j > 0; j--) 
		                C[j] = (C[j] + C[j - 1]) % p; 
		        } 
		        return C[r]%p; 
		    } 
	    
	  public long power(long x, long y, long p) 
	    { 
	        long res = 1;      
	      // out.println(x+" "+y);
	        x = x % p;  
	       if (x == 0) return 0;    
	  
	        while (y > 0) 
	        { 
	            if((y & 1)==1) 
	                res = (res * x) % p; 
	            y = y >> 1;  
	            x = (x * x) % p;  
	        } 
	        return res; 
	    } 
	    
	    		
	    
	    
	    
	    
	    
	    static Throwable uncaught;
	 
	    BufferedReader in;
	    FastScanner sc;
	    PrintWriter out;
	 
	    @Override
	    public void run() {
	        try {
	            in = new BufferedReader(new InputStreamReader(System.in));
	            out = new PrintWriter(System.out);
	            sc = new FastScanner(in);
	            solve();
	        } catch (Throwable uncaught) {
	            Solution.uncaught = uncaught;
	        } finally {
	            out.close();
	        }
	    }
	 
	    public static void main(String[] args) throws Throwable {
	        Thread thread = new Thread(null, new Solution(), "", (1 << 26));
	        thread.start();
	        thread.join();
	        if (Solution.uncaught != null) {
	            throw Solution.uncaught;
	        }
	    }
	 
	}
	 
	class FastScanner {
	 
	    BufferedReader in;
	    StringTokenizer st;
	 
	    public FastScanner(BufferedReader in) {
	        this.in = in;
	    }
	 
	    public String nextToken() throws Exception {
	        while (st == null || !st.hasMoreTokens()) {
	            st = new StringTokenizer(in.readLine());
	        }
	        return st.nextToken();
	    }
	 
	    public int nextInt() throws Exception {
	        return Integer.parseInt(nextToken());
	    }
	    
	    public int[] readArray(int n) throws Exception {
			int[] a=new int[n];
			for (int i=0; i<n; i++) a[i]=nextInt();
			return a;
		}
	 
	    public long nextLong() throws Exception {
	        return Long.parseLong(nextToken());
	    }
	 
	    public double nextDouble() throws Exception {
	        return Double.parseDouble(nextToken());
	    }
	 
	}