#include <bits/stdc++.h>

using namespace std;

const int maxn = 3100;
const int base = 1e9+7;

int n,m,f[maxn][maxn][3];

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin>>n>>m;
    f[0][0][1]=1;
    for (int j=1;j<=n;j++)
        f[0][j][0]=1;
    for (int i=0;i<m;i++)
        for (int j=0;j<=n;j++)
            for (int tt =0;tt<2;tt++) {
                if (j) {
                    f[i+1][j][tt | (j==1)] = (f[i+1][j][tt | (j==1)] + f[i][j][tt]) % base;
                    f[i+1][j-1][tt | (j==1)] = (f[i+1][j-1][tt | (j==1)] + f[i][j][tt]) % base;
                }
                if (j<n) {
                    f[i+1][j][tt | (j==0)] = (f[i+1][j][tt | (j==0)] + f[i][j][tt]) % base;
                    f[i+1][j+1][tt] = (f[i+1][j+1][tt] + f[i][j][tt]) % base;
                }
            }
    int res=0;
    for (int j=0;j<=n;j++) res = (res + f[m][j][1]) % base;
    cout<<res<<endl;
}
