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 pb push_back
#define mp make_pair
#define ll long long
#define mt make_tuple
#define ldb double
#define pii pair<int,int>
#define pll pair<ll,ll>
template<typename T>void ckmn(T &a,T b){a=min(a,b);}
template<typename T>void ckmx(T &a,T b){a=max(a,b);}
int ri(){int x;scanf("%i",&x);return x;}
void rd(){}
template<typename...T>void rd(int &x,T&...args){scanf("%i",&x);rd(args...);}
template<typename...T>void rd(ll &x,T&...args){scanf("%lld",&x);rd(args...);}
template<typename...T>void rd(ldb &x,T&...args){scanf("%lf",&x);rd(args...);}
template<typename...T>void rd(pii &x,T&...args){scanf("%i %i",&x.first,&x.second);rd(args...);}
const int mod=1e9+7;//998244353
int add(int a,int b){a+=b;return a>=mod?a-mod:a;}
void ckadd(int&a,int b){a=add(a,b);}
int sub(int a,int b){a-=b;return a<0?a+mod:a;}
void cksub(int&a,int b){a=sub(a,b);}
int mul(int a,int b){return (ll)a*b%mod;}
void ckmul(int&a,int b){a=mul(a,b);}
int powmod(int x,int k){int ans=1;for(;k;k>>=1,ckmul(x,x))if(k&1)ckmul(ans,x);return ans;}
int inv(int x){return powmod(x,mod-2);}
const int N=5005;
struct SUM{
	int sum[N*2];
	void Add(int i,int x){ckadd(sum[i+N],x);}
	int Get(int i){return sum[i+N];}
}SM;
int dp[N][N],res[N],sum_dp[N];
int main(){
	int n,A,B;
	rd(n,A,B);
	if(A>B)swap(A,B);
	dp[0][0]=1;
	sum_dp[0]=1;
	for(int i=1;i<=n+1;i++){
		res[i]=mul(2,res[i-1]);
		for(int suf=0;suf<=i;++suf){
			if(suf>0)dp[i][suf]=dp[i-1][suf-1];
			ckadd(dp[i][suf],SM.Get(i-suf));
			//printf("%i ",dp[i][suf]);
		}
		for(int j=2;j<=A;j++){
			if(i-j>=0)ckadd(dp[i][1],sum_dp[i-j]);
		}
		for(int suf=0;suf<=i;suf++){
			if(i<=n&&suf>=B){
				ckadd(res[i],dp[i][suf]);
				dp[i][suf]=0;
			}else ckadd(sum_dp[i],dp[i][suf]);
		}
		//printf("%i\n",res[i]);
		if(i>=A){
			for(int suf=0;suf<=i-A;++suf){
				//if(dp[i-A][suf])printf("%i %i\n",i-A-suf,dp[i-A][suf]);
				SM.Add(i-A-suf,dp[i-A][suf]);
			}
		}

		//for(int suf=0;suf<=i;suf++)printf("%i ",dp[i][suf]);
		//printf("%i\n",res[i]);
	}
	int ans=res[n];
	for(int i=B+1;i<=n+1;i++)ckadd(ans,dp[n+1][i]);
	printf("%i\n",ans);
	return 0;
}