#include<bits/stdc++.h>
#define rep(i,a,b) for (LL i=(a); i<=(b); i++)
using namespace std;
typedef long long LL;

const int maxn = 3009;
const int RXD = 1000000007;
int f[maxn][maxn][2];
int n, m, ans;

void add(int &a, int b) {
	a = (a + b) % RXD;
}

int main() {
	scanf("%d%d", &n, &m); n--; m--;
	rep (i, 0, n) f[0][i][i==0] = 1;
	rep (i, 0, m) rep (j, 0, n) rep (k, 0, 1) {
		add(f[i+1][j+1][k], f[i][j][k]);
		add(f[i+1][j][k], (f[i][j][k] * 2) % RXD);
		if (j) add(f[i+1][j-1][k||j==1], f[i][j][k]);
	}
	rep (i, 0, n) add(ans, f[m][i][1]);
	ans = 4LL * ans % RXD;
	printf("%d\n", ans);
	return 0;
}
