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 ll long long
#define ui long long
#define ull unsigned long long
#define db double
#define pii pair<int,int>
#define pli pair<ll,int>
#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define vi vector<int>
#define vii vector<vi>
#define lb lower_bound
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
#define per(i,b,a) for(int i=(b);i>=(a);--i)
#define rep0(i,a,b) for(int i=(a);i<(b);++i)
#define fore(i,a) for(int i=0;i<a.size();++i)
#define gc() getchar()
#define ls x<<1,l,m
#define rs x<<1|1,m+1,r
inline ll rd()
{
	ll x=0,w=1;char c=gc();while(!isdigit(c)&&c!='-')c=gc();
	if(c=='-')c=gc(),w=-1;while(isdigit(c))x=x*10+c-48,c=gc();return x*w;
}
const int N=5005,P=1e9+7;
int n,a,b,f[N],g[N],F[N],G[N],sf[N],sg[N],sF[N],sG[N];
int main()
{
	n=rd();a=rd();b=rd();if(a>b)swap(a,b);
	f[1]=1;g[1]=0;sf[1]=1;sg[1]=0;
	rep(i,2,b)
	{
		f[i]=sg[i-1]+1;g[i]=i>=a?sf[i-a]:0;
		sf[i]=(sf[i-1]+f[i])%P;sg[i]=(sg[i-1]+g[i])%P;
	}
	F[0]=1;sF[0]=1;G[0]=1;sG[0]=1;
	rep(i,1,n)
	{
		F[i]=(sG[i-1]+P-(i>=a?sG[i-a]:0))%P;
		rep(j,1,b-1)if(i-j>=0)G[i]=(G[i]+1ll*F[i-j]*f[j])%P;
		if(i<b)rep(j,a,i-1)G[i]=(G[i]+f[i-j])%P;
		sF[i]=(sF[i-1]+F[i])%P;sG[i]=(sG[i-1]+G[i])%P;
	}
//	rep(i,1,b-1)cout<<f[i]<<" ";cout<<endl;
//	rep(i,1,b-1)cout<<g[i]<<" ";cout<<endl;
//	rep(i,0,n)cout<<F[i]<<" ";cout<<endl;
//	rep(i,0,n)cout<<G[i]<<" ";cout<<endl;
	int ans=(F[n]+G[n])%P;//cout<<ans<<endl;
	rep(i,1,b-1)rep(j,a,i-1)ans=(ans+1ll*F[n-i]*f[i-j])%P;
	int t=1;rep(i,1,n)t=2ll*t%P;
	printf("%d\n",(t+P-ans)%P);return 0;
}
