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;
typedef long long ll;
typedef pair<ll,ll> pll;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(x) x.begin(),x.end()
#define chmin(a,b) a=min(a,b)
#define chmax(a,b) a=max(a,b)
#define mod 1000000007
#define pl(a,b) a=(a+b)%mod;
#define N 5010
ll dpb[N][N],dpr[N][N];
ll cs1[N][N],cs2[N];
int main(){
	ll n,a,b;
	cin>>n>>a>>b;
	if(a>b)swap(a,b);
	rep(i,N)rep(j,N)dpb[i][j]=dpr[i][j]=0;
	rep(i,N)rep(j,N)cs1[i][j]=0;
	rep(i,N)cs2[i]=0;
	dpb[0][1]=1;
	ll ans=0;
	for(int i=0;i<=n;i++)for(int j=0;j<=n+1;j++){
		if(i-j+1>=b)continue;
		if(i)pl(cs1[j][i],cs1[j][i-1]);
		pl(dpr[i][j],cs1[j][i]);
		if(i+1==j){
			pl(cs2[i],cs2[i-1]);
			pl(dpr[i][j],cs2[i]);
		}
		if(i==n){
			pl(ans,dpb[i][j]);
			pl(ans,dpr[i][j]);
			continue;
		}
		pl(dpb[i+1][j],dpb[i][j]);
		pl(dpb[i+1][j],dpr[i][j]);
		pl(cs1[j][i+a],dpb[i][j]);
		pl(cs2[i+1],dpb[i][j]);
		pl(cs2[i+a],-dpb[i][j]);
		/*
		for(int k=1;i+k<=n;k++){
			if(k>=a)pl(dpr[i+k][j],dpb[i][j]);
			if(k<a)pl(dpr[i+k][i+k+1],dpb[i][j]);
		}*/
	}
	ll c=1;
	rep(i,n)c=c*2%mod;
	ans=c-ans;
	ans%=mod;
	if(ans<0)ans+=mod;
	cout<<ans<<endl;
}
