#include<cstdio> 
#include<algorithm>
#include<cstring>
#include<cmath>
#include<set>
#include<map>
using namespace std;
#define fo(i,j,k) for(i=j;i<=k;i++)
#define fd(i,j,k) for(i=j;i>=k;i--)
#define cmax(a,b) (a=(a>b)?a:b)
#define cmin(a,b) (a=(a<b)?a:b)
typedef long long ll;
const int N=1e6+5,M=2e6+5,mo=1e9+7;
ll f[3005][3005][2];
int n,m,i,j,k,ans;
int main()
{
	scanf("%d %d",&n,&m);
	fo(i,0,n) f[0][i][i==0]=1;
	fo(i,0,m-1)
		fo(j,0,n)
			fo(k,0,1)
			{
				if (j) (f[i+1][j-1][k|(j==1)]+=f[i][j][k])%=mo;
				if (j) (f[i+1][j][k|(j==1)]+=f[i][j][k])%=mo;
				if (n-j) (f[i+1][j+1][k]+=f[i][j][k])%=mo;
				if (n-j) (f[i+1][j][k]+=f[i][j][k])%=mo;
			}
	fo(i,0,n) ans=(ans+f[m][i][1])%mo;
	printf("%d\n",ans%mo);
}