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
// Etavioxy
#include<cstdio>
#include<cctype>
#include<cstring>
#include<algorithm>
#include<cmath>
#define il inline
#define ll long long
#define rep(i,s,t) for(register int i=(s);i<=(t);i++)
#define rev_rep(i,s,t) for(register int i=(s);i>=(t);i--)
#define each(i,u) for(int i=head[u];i;i=bow[i].nxt)
#define file(s) freopen(s".in" ,"r",stdin),freopen(s".out","w",stdout)
#define pt(x) putchar(x)
using namespace std;
il int ci(){
	register char ch;int f=1;
	while(!isdigit(ch=getchar()))f=ch=='-'?-1:1;
	register int x=ch^'0';
	while(isdigit(ch=getchar()))x=(x*10)+(ch^'0');
	return f*x;
}

const int mod = 1e9+7;
enum{N=5003};
il ll qpow(ll a,ll b){
	ll ans= 1;
	for(; b; b>>=1,a=a*a%mod) if( b&1 ){
		ans= ans*a%mod;
	} return ans;
}

ll f[N][2],g[N][2];
ll f2[N][2];
ll w[N];

int main(){
	int n = ci(), a = ci(), b = ci();
	if( a>b ) swap(a,b);
	if( b==1 ){
		printf("%lld\n",qpow(2,n));
		return 0;
	}
	f[0][0] = 1;
	rep(i,1,b-1){
		rep(j,1,i){
			if( j>=a ) f[i][0] = (f[i][0]+f[i-j][1])%mod;
			f[i][1] = (f[i][1]+f[i-j][0])%mod;
		}
	}
	f2[0][1] = 1;
	rep(i,1,b-1){
		rep(j,1,i){
			if( j>=a ) f2[i][0] = (f2[i][0]+f2[i-j][1])%mod;
			f2[i][1] = (f2[i][1]+f2[i-j][0])%mod;
		}
	}
	g[0][1] = g[0][0] = 1;
	ll ans = qpow(2,n);
	rep(i,1,n){
		if( i<b ){
			g[i][1] = (g[i][1]+f2[i][1])%mod;
		}
		rep(j,1,min(i,b-1)){
			if( j<a ) g[i][0] = (g[i][0]+g[i-j][1])%mod;
			g[i][1] = (g[i][1]+g[i-j][0]*f[j][1])%mod;
		}
		if( i!=n && n-i<b ){
			ans = (ans-g[i][0]*f[n-i][0])%mod;
		}
	}
	ans = (ans-g[n][1]-g[n][0])%mod;
	printf("%lld\n",(ans+mod)%mod);
	return 0;
}
