#include<bits/stdc++.h>
using namespace std;

const int mod = 1000000007;
int N, M;
int dp[3002][3002][2];

int main() {
    scanf("%d %d", &N, &M);
    N--;
    M--;

    for(int m = 0; m <= M; m++) {
        for(int r = 0; r <= N; r++) {
            for(int z = 0; z < 2; z++) {
                if(m == 0) {
                    dp[m][r][z] = z | (r == 0);
                    continue;
                }
                dp[m][r][z] = 2 * dp[m - 1][r][ z | (r == 0) ] % mod;
                if(r != 0) dp[m][r][z] = (dp[m][r][z] + dp[m - 1][r - 1][ z | (r == 0) ]) % mod;
                if(r != N) dp[m][r][z] = (dp[m][r][z] + dp[m - 1][r + 1][ z | (r == 0) ]) % mod;
            }
        }
    }

    int ans = 0;
    for(int i = 0; i <= N; i++) {
        ans += dp[M][i][0];
        ans %= mod;
    }
    ans = 4LL * ans % mod;
    printf("%d", ans);
}
