#include<bits/stdc++.h>
using namespace std;
#define N 3333
#define mod 1000000007

int n,m,f[N][N][2],ans;

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

int read(){
	int x=0,f=1;char ch=getchar();
	for (;!isdigit(ch);ch=getchar()) if (ch=='-') f=-f;
	for (;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	return x*f;
}

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