#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cstdlib>
#include<ctime>
#include<functional>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<bitset>
#define rp(i,l,r) for(int i=l;i<r;i++)
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
void open(const char *s){
#ifdef ONLINE_JUDGE
    char str[100];sprintf(str,"%s.in",s);freopen(str,"r",stdin);sprintf(str,"%s.out",s);freopen(str,"w",stdout);
#endif
}
void open2(const char *s){
#ifdef DEBUG
    char str[100];sprintf(str,"%s.in",s);freopen(str,"r",stdin);sprintf(str,"%s.out",s);freopen(str,"w",stdout);
#endif
}
template <class T>
int upmin(T &a, const T &b){return (b<a?a=b,1:0);}
template <class T>
int upmax(T &a, const T &b){return (b>a?a=b,1:0);}
namespace io
{
    const int SIZE=(1<<20)+1;
    char ibuf[SIZE],*iS,*iT;
    char obuf[SIZE],*oS=obuf,*oT=oS+SIZE-1;
    int getc()
    {
        (iS==iT?iS=ibuf,iT=ibuf+fread(ibuf,1,SIZE,stdin):0);
        return iS==iT?EOF:*(iS++);
    }
    int f;
    char c;
    template <class T>
    void get(T &x)
    {
        f=1;
        for(c=getc();(c<'0'||c>'9')&&c!='-';c=getc());
        (c=='-'?f=-1,c=getc():0);
        x=0;
        for(;c>='0'&&c<='9';c=getc())
            x=x*10+c-'0';
        x*=f;
    }
    void flush()
    {
        fwrite(obuf,1,oS-obuf,stdout);
        oS=obuf;
    }
    void putc(char x)
    {
        *(oS++)=x;
        if(oS==oT)
            flush();
    }
    int a[55],t;
    template <class T>
    void put(T x)
    {
        if(!x)
            putc('0');
        x<0?putc('-'),x=-x:0;
        while(x)
        {
            a[++t]=x%10;
            x/=10;
        }
        while(t)
            putc(a[t--]+'0');
    }
    void space()
    {
        putc(' ');
    }
    void enter()
    {
        putc('\n');
    }
    struct flusher
    {
        ~flusher()
        {
            flush();
        }
    }
    io_flusher;
}
inline void close(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
}
using namespace std;
const int mod=1e9+7;
const int maxn=3010;
int f[maxn][maxn][2];
int n,m;
int main(){
    close();
    cin>>n>>m;
    f[0][0][1]=1;
    rep(i,1,n){
        f[0][i][0]=1;
    }
    rp(i,0,m){
        rep(j,0,n){
            rep(k,0,1){
                if(j) (f[i+1][j-1][!(j-1)|k]+=f[i][j][k])%mod;
                if(n-j) (f[i+1][j+1][k]+=f[i][j][k])%mod;
                if(j) (f[i+1][j][k|(j==1)]+=f[i][j][k])%mod;
                if(n-j) (f[i+1][j][k]+=f[i][j][k])%mod;
            }
        }
    }
    int ans=0;
    rep(i,0,n){
        (ans+=f[m][i][1])%mod;
    }
    cout<<ans<<endl;
    return 0;
}