#include <cstdio>
#include <algorithm>
#define repu(i,x,y) for (int i=x; i<=y; ++i)
using namespace std;

const int p=1000000007;
int n,m,f[3010][3010][2],g[3010][6010][2],ans;

int main()
{
    scanf("%d%d",&n,&m);
    repu(i,0,n)
        g[0][i][!i]=1;
    repu(i,1,m)
    {
        repu(j,0,n)
            repu(k,0,1)
            {
                if (j)
                    (f[i][j][k || j==1]+=g[i-1][j][k])%=p;
                if (j<n)
                    (f[i][j+1][k]+=g[i-1][j][k])%=p;
            }
        repu(j,1,n)
            repu(k,0,1)
            {
                if (j)
                    (g[i][j-1][k || j==1]+=f[i][j][k])%=p;
                (g[i][j][k]+=f[i][j][k])%=p;
            }
    }
    repu(i,0,n)
        (ans+=g[m][i][1])%=p;
    printf("%d\n",ans);
    return 0;
}