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

#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define RREP(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();++i)
#define LET(x,a) __typeof(a) x(a)
//#define IFOR(i,it,c) for(__typeof((c).begin())it=(c).begin();it!=(c).end();++it,++i)
#define ALL(c) (c).begin(), (c).end()
#define MP make_pair

#define EXIST(e,s) ((s).find(e)!=(s).end())

#define RESET(a) memset((a),0,sizeof(a))
#define SET(a) memset((a),-1,sizeof(a))
#define PB push_back
#define DEC(it,command) __typeof(command) it=command

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
#define debug2(x) cerr << #x << " = [";REP(__ind,(x).size()){cerr << (x)[__ind] << ", ";}cerr << "] (L" << __LINE__ << ")" << endl;

const int INF=0x3f3f3f3f;

typedef long long Int;
typedef unsigned long long uInt;
typedef long double rn;

typedef pair<int,int> pii;

/*
#ifdef MYDEBUG
#include"debug.h"
#include"print.h"
#endif
*/
// }}}

const int mod = 1000000007;
//{{{ modular algebra
template<int mod>
struct Num{
	int v;
	Num(int n):v(n){}
	Num():v(0){}
	operator int() const {return v;}
	operator long long() const {return v;}
	void operator =(int n){v=n;}

	template<class T>
		inline void operator *=(const T &a) {
			v = (v*(long long)a)%mod;
		}
	template<class T>
		inline Num operator *(const T &a) {
			Num n(*this);n*=a;
			return n;
		}
	template<class T>
		inline void operator+=(const T &a){
			v+=(int)a;
			if(v>=mod)v-=mod;
			//	assert(0<=v and v<mod);
		}
	template<class T>
		inline Num operator+(const T &a){
			Num n(*this);n+=a;
			return n;
		}
	inline Num operator -(){
		if(v==0)return v;
		else return Num(mod-v);
	}
	template<class T>
		inline void operator -=(const T &a){
			v-=(int)a;
			if(v<0)v+=mod;
		}
	template<class T>
		inline Num operator -(const T &a){
			Num n(*this);n-=a;
			return n;
		}
#ifdef __GCD_H
	inline Num inv(){
		return invMod(this->v,mod);
	}
	template<class T>
		inline void operator /=(const T &a){
			(*this)*=invMod((int)a,mod);
		}
	template<class T>
		inline Num operator /(const T &a){
			Num n(*this);n/=a;
			return n;
		}
#endif
};

typedef Num<1000000007> U;

template<int mod>
ostream& operator <<(ostream &os,const Num<mod> &n){
	os<<(int)n.v;
	return os;
}

template<int mod>
istream& operator >>(istream &is, Num<mod> &n){
	is>>n.v;
	return is;
}
//}}}

int N,M;

U dp[2][10000][2];

int main(){
	cin>>N>>M;
	int from = 0, to = 1;
	for(int i=0;i<=N;i++){
		if(i==0)dp[from][i][1] = 1;
		else dp[from][i][0] = 1;
	}
	for(int c=0;c<M;c++){
		memset(dp[to],0,sizeof(dp[to]));
		for(int i=0;i<=N;i++){
			if(i>0){
				//red-blue
				if(i==1)dp[to][i][1] += dp[from][i][0];
				else dp[to][i][0] += dp[from][i][0];
				dp[to][i][1] += dp[from][i][1];
				//red-red
				if(i==1)dp[to][i-1][1] += dp[from][i][0];
				else dp[to][i-1][0] += dp[from][i][0];
				dp[to][i-1][1] += dp[from][i][1];
			}
			if(i<N){
				//blue-red
				dp[to][i][0] += dp[from][i][0];
				dp[to][i][1] += dp[from][i][1];
				//blue-blue
				dp[to][i+1][0] += dp[from][i][0];
				dp[to][i+1][1] += dp[from][i][1];
			}
		}
		swap(from,to);
	}
	U ans(0);
	for(int i=0;i<=N;i++)ans+=dp[from][i][1];
	cout<<ans<<endl;
	return 0;
}



Measured memory_bytes: 384