#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <cstring>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <ctime>
#include <cctype>
#include <stack>
#include <map>
#include <time.h>
using namespace std;
#define loop(i, st, en) for(int i = st; i <= en; ++i)
#define reverse(i, st, en) for(int i = st; i >= en; --i)
#define wh(t) while(t--)
#define mem(i, x) memset(i, x, sizeof(i))
#define ssc(x) scanf("%s", x)
#define dsc(x) scanf("%d", &x)
#define lldsc(x) scanf("%I64d",&x)
#define lfsc(x) scanf("%lf", &x)
#define csc(x) scanf("%c",&x)
#define to_(s,i) s[i]-'0'
typedef long long ll;
const int MAXN=3e3+10;
const int MAX=5e6;
const int INF=0x3f3f3f3f;
const ll P=1e9+7;
const ll C=1e5;
/*Atcode2370*/
int n;
int m;
ll dp[MAXN][MAXN][2];
int main(){
    dsc(n);
    dsc(m);
    dp[0][0][0]=1;
    loop(i,1,n) dp[0][i][1]=1;
    loop(i,1,m){
        dp[i][0][0]=(dp[i-1][1][1]+dp[i-1][1][0]+dp[i-1][0][0])%P;
        dp[i][0][1]=dp[i-1][0][1];
        dp[i][n][0]=(dp[i-1][n-1][0]+dp[i-1][n][0])%P;
        dp[i][n][1]=(dp[i-1][n-1][1]+dp[i-1][n][1])%P;
        dp[i][1][0]=(dp[i-1][0][0]+dp[i-1][2][0]+2*dp[i-1][1][0]+dp[i-1][1][1])%P;
        dp[i][1][1]=(dp[i-1][0][1]+dp[i-1][2][1]+dp[i-1][1][1])%P;
        loop(j,2,n-1){
            dp[i][j][0]=(dp[i-1][j-1][0]+dp[i-1][j+1][0]+2*dp[i-1][j][0])%P;
            dp[i][j][1]=(dp[i-1][j-1][1]+dp[i-1][j+1][1]+2*dp[i-1][j][1])%P;
        }
    }
    ll ans=0;
    loop(i,0,n){
        ans=(ans+dp[m][i][0])%P;
    }
    printf("%lld",ans);
    return 0;
}