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;

typedef long long LL;
#define N 6000

const LL mod=1000000007;
LL n,a,b,ans,f[N],g[N],pre[N];

void upd(LL &x,LL y){
	x=(x+y)%mod;
}

int main(){
	scanf("%lld%lld%lld",&n,&a,&b);
	if (a<b) swap(a,b);
	g[0]=1;
	for (LL i=1;i<=n;++i){
		g[i]=g[i-1];
		if (i>=b){
			++g[i];
			for (LL j=b;i-j-1>=0;++j){
				upd(g[i],g[i-j-1]);
			}
		}
	}
	ans=1; for (LL i=1;i<=n;++i) ans=ans*2%mod;
	pre[0]=g[0]; for (LL i=1;i<=n;++i) pre[i]=(pre[i-1]+g[i])%mod;
	for (LL i=1;i<=n;++i){
		for (LL j=1;j<i-1;++j){
			LL l=max(i-j-2-b+1,0LL),r=min(a-2,i-j-2)-1;
			if (l<=r){
				upd(f[i],f[j]*(pre[r]-(l?pre[l-1]:0)));
			}
			if (a>1&&i-j-1<b){
				upd(f[i],f[j]);
			}
		}
		LL l=max(i-1-b+1,0LL),r=min(a-1,i-1)-1;
		if (l<=r) upd(f[i],pre[r]-(l?pre[l-1]:0));
		if (i<b) upd(f[i],1);
		if (i<n&&n-i<a) upd(ans,-f[i]*g[n-i-1]);
		if (i==n) upd(ans,-f[i]);
	}
	upd(ans,mod);
	printf("%lld\n",ans);
	
	return 0;
}
			