#include<bits/stdc++.h>

using namespace std;

#define N 3200

const int mod=1000000007;
int n,m,ans,f[N][N][2];

void upd(int &x,int y){x=(x+y)%mod;}

int main(){
	scanf("%d%d",&n,&m);
	for (int i=0;i<=n;++i) f[0][i][i==0]=1;
	for (int i=1;i<=m;++i)
		for (int j=0;j<=n;++j)
			for (int k=0;k<2;++k){
				if (j>0){
					upd(f[i][j][k||j==1],f[i-1][j][k]);
					upd(f[i][j-1][k||j==1],f[i-1][j][k]);
				}
				if (j<n){
					upd(f[i][j][k],f[i-1][j][k]);
					upd(f[i][j+1][k],f[i-1][j][k]);
				}
			}
	for (int i=0;i<=n;++i) upd(ans,f[m][i][1]);
	printf("%d\n",ans);
	
	return 0;
}
			