#include <cstdio>
#define MOD 1000000007
int dp[3005][3005][2];
int main()
{
	// freopen("AGC013-D.in", "r", stdin);
	int n, m;
	scanf("%d%d", &n, &m);
	for (int i = 0; i <= n; i++)
		dp[0][i][!i] = 1;
	for (int i = 0; i < m; i++)
	{
		for (int j = 0; j <= n; j++)
		{
			for (int x = 0; x < 2; x++)
			{
				if (j)
				{
					(dp[i + 1][j - 1][x | !(j - 1)] += dp[i][j][x]) %= MOD;
					(dp[i + 1][j][x | !(j - 1)] += dp[i][j][x]) %= MOD;
				}
				if (j != n)
				{
					(dp[i + 1][j + 1][x] += dp[i][j][x]) %= MOD;
					(dp[i + 1][j][x] += dp[i][j][x]) %= MOD;
				}
			}
		}
	}
	int ans = 0;
	for (int i = 0; i <= n; i++)
		(ans += dp[m][i][1]) %= MOD;
	printf("%d\n", ans);
	return 0;
}
