#include <cstdio>
#include <cstring>
#include <algorithm>
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
using namespace std;

const int N=3005,Mo=1e9+7;

void inc(int &x,int y) {
	x+=y;
	x-=(x>=Mo)?Mo:0; 
}

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

int Dp(int n,int m) {
	fo(i,0,m) fo(j,0,n) f[i][j]=0;
	fo(i,0,n) f[0][i]=1;
	fo(i,0,m-1)
		fo(j,0,n)
			if (f[i][j]) {	
				if (j>0) inc(f[i+1][j-1],f[i][j]);
				if (j>0) inc(f[i+1][j],f[i][j]);
				if (j<n) inc(f[i+1][j],f[i][j]);
				if (j<n) inc(f[i+1][j+1],f[i][j]); 	
			}
	int ans=0;
	fo(i,0,n) inc(ans,f[m][i]);
	return ans;
}

int main() {
	scanf("%d%d",&n,&m);
	printf("%d\n",(Dp(n,m)-Dp(n-1,m)+Mo)%Mo);
	return 0;
}