#include <iostream>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <sstream>
#include <stack>
#include <deque>
using namespace std;
#define ll long long
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pi pair<int,int>
#define pii pair<pi,int>
#define sqr(x)((x)*(x))
#define FOR for(int i=0;i<n;i++)for(int j=0;j<m;j++)
const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define fo(i,a,b) for(i=a;i<=b;i++)
using namespace std;
const int inf=1000000007;
int asd[3005][3005][2],g[3005][3005][2][2];
int l,t,n,m,ans;
int main(){
    cin>>n>>m;
    asd[0][0][1]=1;
    for(int i=1;i<=n;i++)asd[0][i][0]=1;
	for(int i=0;i<=m-1;i++)for(int j=0;j<=n;j++){
            for(int k=0;k<=1;k++){
                if(j)(asd[i+1][j-1][k|(j-1==0)]+=asd[i][j][k])%=inf;
                if(j)(asd[i+1][j][k|(j==1)]+=asd[i][j][k])%=inf;
                if(n-j)(asd[i+1][j][k]+=asd[i][j][k])%=inf;
                if(n-j)(asd[i+1][j+1][k]+=asd[i][j][k])%=inf;}}
    for(int i=0;i<=n;i++)(ans+=asd[m][i][1])%=inf;
    printf("%d\n",ans);
}