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>
#define clr(x) memset(x,0,sizeof (x))
#define For(i,a,b) for (int i=(a);i<=(b);i++)
#define Fod(i,b,a) for (int i=(b);i>=(a);i--)
#define fi first
#define se second
#define kill _z_kill
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define outval(x) cerr<<#x" = "<<x<<endl
#define outv(x) cerr<<#x" = "<<x<<"  "
#define outtag(x) cerr<<"--------------"#x"---------------"<<endl
#define outarr(a,L,R) cerr<<#a"["<<L<<".."<<R<<"] = ";\
	For(_x,L,R) cerr<<a[_x]<<" ";cerr<<endl;
#define User_Time ((double)clock()/CLOCKS_PER_SEC)
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned uint;
typedef long double LD;
typedef vector <int> vi;
typedef pair <int,int> pii;
LL read(){
	LL x=0,f=0;
	char ch=getchar();
	while (!isdigit(ch))
		f=ch=='-',ch=getchar();
	while (isdigit(ch))
		x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return f?-x:x;
}
const int mod=1e9+7;
int Pow(int x,int y){
	int ans=1;
	for (;y;y>>=1,x=(LL)x*x%mod)
		if (y&1)
			ans=(LL)ans*x%mod;
	return ans;
}
void Add(int &x,int y){
	if ((x+=y)>=mod)
		x-=mod;
}
void Del(int &x,int y){
	if ((x-=y)<0)
		x+=mod;
}
int Add(int x){
	return x>=mod?x-mod:x;
}
int Del(int x){
	return x<0?x+mod:x;
}
const int N=5005;
int n,A,B;
int dp[N][N];
int s1[N][N],s2[N][N];
int pw2[N];
int main(){
	n=read(),A=read(),B=read();
	pw2[0]=1;
	For(i,1,n+1)
		pw2[i]=Add(pw2[i-1]<<1);
	if (A<B)
		swap(A,B);
	dp[0][0]=1;
	int ans=0;
	For(i,0,n-1)
		For(j,0,i){
			int &v=dp[i][j];
			if (i>0)
				Add(s1[i][j],s1[i-1][j]);
			Add(v,s1[i][j]);
			if (i>0&&j>0)
				Add(s2[i][j],s2[i-1][j-1]);
			Add(v,s2[i][j]);
//			printf("dp[%d][%d]=%d\n",i,j,v);
			if (!v)
				continue;
			int L=0,R=n-i-1;
			if (j+1>=A)
				Add(ans,(LL)v*pw2[n-i-1]%mod);
			else
				Add(dp[i+1][j+1],v);
			L=1;
			int b=max(L-1,min(B-1,R));
			Add(s1[i+L+1][1],v);
			Del(s1[i+b+2][1],v);
			L=b+1;
			if (L<=R){
				int a=min(R+1,max(L,A-j-1));
				//[a~R]
				if (a<=R){
					//pw2[n-i-1-R]+..+pw2[n-i-1-a]
					int x=n-i-1-R,y=n-i-1-a;
					Add(ans,(LL)v*Del(pw2[y+1]-pw2[x])%mod);
				}
				R=a-1;
				if (L<=R){
					Add(s2[i+L+1][j+L+1],v);
					Del(s2[i+R+2][j+R+2],v);
				}
			}
//			For(k,0,n-i-1){
//				if (0<k&&k<B)
//					Add(dp[i+k+1][1],v);
//				else if (j+k+1>=A)
//					Add(ans,(LL)v*Pow(2,n-i-k-1)%mod);
//				else
//					Add(dp[i+k+1][j+k+1],v);
//			}
			if (n-i>=B&&j+n-i>=A)
				Add(ans,v);
		}
	cout<<ans<<endl;
	return 0;
}
