# include <bits/stdc++.h>

using namespace std;
const int maxn = 3010;
const int mod = 1e9 + 7;

int f[maxn][maxn * 2];
int g[maxn][maxn * 2];
int n, m;

int main() {
	scanf("%d%d", &n, &m);
	--m; --n;
	g[0][0] = 1;
	for(int j = 1; j <= n; ++j) f[0][j] = 1;
	for(int i = 1; i <= m; ++i) {
		g[i][0] = (2ll * g[i-1][0] + g[i-1][1] + f[i-1][1]) % mod;
		for(int j = 1; j <= n; ++j) {
			f[i][j] = (2ll * f[i-1][j] + f[i-1][j-1] + f[i-1][j+1]) % mod;
			g[i][j] = (2ll * g[i-1][j] + g[i-1][j-1] + g[i-1][j+1]) % mod;
		}
	}
	int ans = 0;
	for(int j = 0; j <= n; ++j) ans = (ans + g[m][j]) % mod;
	ans = (ans << 1) % mod;
	ans = (ans << 1) % mod;
	printf("%d\n",ans);
	return 0;
}
