//Heaplax
//别让自己后悔
#include<bits/stdc++.h>
#define LL long long
#define LOG(x) cerr<<#x<<" = "<<x<<endl
#define add_edge(u,v) nxt[++cnt]=head[u],head[u]=cnt,to[cnt]=v
#define open(x) freopen(#x".in","r",stdin),freopen(#x".out","w",stdout)
char ch;bool fs;void re(int& x)
{
	while(ch=getchar(),ch<33);
	if(ch=='-')fs=1,x=0;else fs=0,x=ch-48;
	while(ch=getchar(),ch>33)x=x*10+ch-48;
	if(fs)x=-x;
}
using namespace std;
const int mod=1000000007;
int n,m,ans,f[3005][3005][2];
void add(int &a,int b)
{
	a=a+b<mod?a+b:a+b-mod;
}
int main()
{
	re(n),re(m);
	for(int i=0;i<=n;++i)
		f[0][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)add(f[i][j][k|(j==1)],f[i-1][j][k]),add(f[i][j-1][k|(j==1)],f[i-1][j][k]);
				if(j<n)add(f[i][j][k|(j==0)],f[i-1][j][k]),add(f[i][j+1][k|(j==0)],f[i-1][j][k]);
			}
	for(int i=0;i<=n;++i)
		add(ans,f[m][i][1]);
	printf("%d\n",ans);
}
