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 ll long long
#define uint unsigned int
#define ull unsigned long long
#define inf 1010000000
#define infll 1010000000000000000ll
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pdd pair<double,double>
#define mpr make_pair
#define fi first
#define se second
#define pq priority_queue<int>
#define pqll priority_queue<ll>
#define up(x,y) (x<(y)?x=(y):0)
#define dn(x,y) (x>(y)?x=(y):0)
#define ad(x,y) (x=(x+(y))%mod)
#define cbn(x,y) ((ll)fac[x]*inv[y]%mod*inv[(x)-(y)]%mod)
#define N 5009
#define mod 1000000007
using namespace std;

int read(); ll readll();

int n,A,B,f[N],g[N],h[N];
int main(){
	scanf("%d%d%d",&n,&A,&B);
	if (B>n){ puts("1"); return 0; }
	if (A>n){ puts("2"); return 0; }
	if (A>B) swap(A,B);
	int i,j,ans;
	for (i=ans=1; i<=n; i++) ans=(ans<<1)%mod;
	f[0]=g[0]=1;
	for (i=1; i<B; i++)
		for (j=h[i]=1,f[i]=max(0,i-A); i-j>A; j++){
			ad(h[i],(ll)h[j]*(i-j-A));
			ad(f[i],(ll)f[j]*(i-j-A));
		}
	for (i=1; i<=n; i++)
		for (j=0; j<i; j++){
			ad(f[i],(ll)g[j]*h[i-j]);
			if (i-j<A) ad(g[i],f[j]);	
		}
	for (i=h[0]=1; i<B; i++)
		for (j=h[i]=0; i-j>A; j++)
			ad(h[i],(ll)h[j]*(i-j-A));
	ad(ans,mod-f[n]);
	for (i=0; i<B; i++) ad(ans,mod-(ll)g[n-i]*h[i]%mod);
	printf("%d\n",ans);
	return 0;
}

int read(){
	int x=0; char ch=getchar(); bool flag=0;
	while (ch<'0' || ch>'9'){ if (ch=='-') flag=1; ch=getchar(); }
	while (ch>='0' && ch<='9'){ x=x*10+ch-'0'; ch=getchar(); }
	return flag?-x:x;
}
ll readll(){
	ll x=0; char ch=getchar(); bool flag=0;
	while (ch<'0' || ch>'9'){ if (ch=='-') flag=1; ch=getchar(); }
	while (ch>='0' && ch<='9'){ x=x*10+ch-'0'; ch=getchar(); }
	return flag?-x:x;
}
