#include<bits/stdc++.h>
#define ll long long
#define N 100005
#define mod 1000000007
#define For(i,x,y) for(int i=x;i<=y;i++)
#define Rep(i,x,y) for(int i=x;i>=y;i--)
using namespace std;
inline int read(){
	int x=0,f=0;char ch=getchar();
	for(;ch<'0'||ch>'9';ch=getchar()) if(ch=='-') f=1;
	for(;ch>='0'&&ch<='9';ch=getchar()) x=(x<<1)+(x<<3)+ch-48;
	return f?-x:x;
}
int n,m;
ll f[3005][3005][2];
int main(){
	n=read();m=read()-2;
	For(i,0,n-1) f[0][i][i==0]=1;
	For(i,0,m) For(j,0,n) For(k,0,1) if(f[i][j][k]>0){
		if(j) f[i+1][j-1][(k)||j-1==0]=(f[i+1][j-1][(k)||j-1==0]+f[i][j][k])%mod;
		if(j<n-1) f[i+1][j+1][k]=(f[i+1][j+1][k]+f[i][j][k])%mod;
		f[i+1][j][k]=(f[i+1][j][k]+f[i][j][k]*2)%mod;
	}
	ll ans=0;
	For(i,0,n-1) ans=(ans+f[m+1][i][1])%mod;
	printf("%d\n",ans*4%mod);
	return 0;
}
