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 y1 dmytxdy
#define pb push_back
#define fi first
#define se second
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef long double ld;

template <typename T> bool chkmin(T &x,T y){return x>y?x=y,1:0;}
template <typename T> bool chkmax(T &x,T y){return x<y?x=y,1:0;}

int readint(){
	int x=0,f=1; char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}

const int cys=1000000007;
int n,a,b;
ll d[5005][5005],s[5005][5005],pw[5005];

ll mod(ll x){return x>=cys?x-cys:x;}

int main(){
	n=readint(); a=readint(); b=readint();
	pw[0]=1;
	for(int i=1;i<=n;i++) pw[i]=mod(pw[i-1]<<1);
	if(a<b) swap(a,b);
	ll ans=0;
	d[0][1]=s[0][1]=1;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=i-a+1;j++){
			int t=i-b-1<0?0:s[i-b-1][j];
			ans=mod(ans+(d[i-1][j]+t)*pw[n-i])%cys;
		}
		for(int j=max(1,i-a+2);j<=i;j++){
			int t=i-b-1<0?0:s[i-b-1][j];
			d[i][j]=mod(d[i-1][j]+t);
		}
		for(int j=1;j<=i;j++) d[i][i+1]=mod(d[i][i+1]+mod(cys+s[i-1][j]-(i-b<0?0:s[i-b][j])));
		for(int j=1;j<=i;j++) s[i][j]=mod(s[i-1][j]+d[i][j]);
	}
	for(int j=1;j<=n-a+1;j++) ans=mod(ans+(n-b<0?0:s[n-b][j]));
	printf("%lld\n",ans);
	return 0;
}