#include <bits/stdc++.h>

using namespace std;

typedef long long int64;
const int mod = 1e9 + 7;

int64 N, M;
int64 dp[3001][3001][2];

int64 rec(int step, int idx, bool touch)
{
  if(step == M) return (touch);
  touch |= idx == 0 || idx == N;
  if(~dp[step][idx][touch]) return (dp[step][idx][touch]);
  int ret = 0;
  if(idx - 1 >= 0) (ret += rec(step + 1, idx, touch)) %= mod;
  if(idx + 1 <= N) (ret += rec(step + 1, idx, touch)) %= mod;
  if(idx - 1 >= 0) (ret += rec(step + 1, idx - 1, touch)) %= mod;
  if(idx + 1 <= N) (ret += rec(step + 1, idx + 1, touch)) %= mod;
  return (dp[step][idx][touch] = ret);
}


int main()
{
  memset(dp, -1, sizeof(dp));
  cin >> N >> M;
  int ret = 0;
  for(int i = 0; i <= N; i++) (ret += rec(0, i, false)) %= mod;
  cout << ret << endl;
}
