Snuke has a string x of length N. Initially, every character in x is `0`.

Snuke can do the following two operations any number of times in any order:

* Choose A consecutive characters in x and replace each of them with `0`.
* Choose B consecutive characters in x and replace each of them with `1`.



Find the number of different strings that x can be after Snuke finishes doing operations. This count can be enormous, so compute it modulo (10^9+7).

Constraints

* 1 \leq N \leq 5000
* 1 \leq A,B \leq N
* All values in input are integers.

Input

Input is given from Standard Input in the following format:


N A B


Output

Print the number of different strings that x can be after Snuke finishes doing operations, modulo (10^9+7).

Examples

Input

4 2 3


Output

11


Input

10 7 2


Output

533


Input

1000 100 10


Output

828178524
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define all(v) v.begin(),v.end()
#define P pair<int,int>
#define len(s) (int)s.size()
#define pb push_back

template<class T> inline bool chmin(T &a, T b){
	if(a>b){a=b;return true;}
	return false;
}
template<class T> inline bool chmax(T &a, T b){
	if(a<b){a=b;return true;}
	return false;
}
constexpr int mod = 1e9+7;
constexpr int inf = 3e18;


int N,A,B;
int pre[5005][2],res[5005];
int dp[5005][2];
int mod_pow(int x,int y,int m=mod){
	int res=1;
	while(y>0){
		if(y&1)(res*=x)%=m;
		(x*=x)%=m;
		y>>=1;
	}
	return res;
}
signed main(){
	cin>>N>>A>>B;
	if(A>B)swap(A,B);
	pre[0][0]=1;
	pre[0][1]=1;
	res[0]=1;
	rep(i,N){
		if(i)res[i]=(pre[i][0]+pre[i][1])%mod;
		REP(j,N-i+1){
			rep(k,2){
				if(!(!k&&j<A))(pre[i+j][k^1]+=pre[i][k])%=mod;
			}
		}
	}

	dp[0][0]=1;dp[0][1]=1;
	rep(i,N){
		REP(j,min(N-i+1,A))(dp[i+j][0]+=dp[i][1])%=mod;
		REP(j,min(N-i+1,B)){
			if(!i||i+j==N)
				(dp[i+j][1]+=dp[i][0]*res[j-1])%=mod;
			else
				(dp[i+j][1]+=dp[i][0]*(j==1?1:res[j-2]))%=mod;
		}
	}
	cout<<(mod_pow(2,N)-dp[N][0]-dp[N][1]+2*mod)%mod<<endl;
}
