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 ljc 1000000007
using namespace std;
#define gc getchar
inline ll read(){
    register ll x=0,f=1;char ch=gc();
    while (!isdigit(ch)){if (ch=='-') f=-1;ch=gc();}
    while (isdigit(ch)){x=(x<<3)+(x<<1)+ch-'0';ch=gc();}
    return (f==1)?x:-x;
}
inline ll fast_pow(ll a,ll b,ll p){
	ll t=1;
	while (b){
		if (b&1ll) t=t*a%p;
		b>>=1ll;a=a*a%p;
	}
	return t;
}
ll n,A,B,dp[5050][2],g[5050][2],h[5050];
inline void add(ll &a,const ll &b){a=(a+b)%ljc;}
signed main(){
	n=read(),A=read(),B=read();
	if (A<B) swap(A,B);
	if (B==1||A==1){
		printf("%lld\n",fast_pow(2,n,ljc));
		return 0;
	}
	g[0][0]=g[0][1]=h[0]=1;
	for (int i=1;i<=A;i++){
		for (int j=1;j<=i;j++) add(g[i][0],g[i-j][1]);
		for (int j=B;j<=i;j++) add(g[i][1],g[i-j][0]);
		h[i]=(g[i][0]+g[i][1])%ljc;
	}
	dp[0][0]=dp[0][1]=1;
	for (int i=1;i<=n;i++){
		for (int j=1;j<=i&&j<B;j++){
			add(dp[i][1],dp[i-j][0]);
		}
		for (int j=1;j<=i&&j<A;j++){
			if (i==j) add(dp[i][0],h[j-1]);
			else if (i!=n) add(dp[i][0],(j>1?h[j-2]:1)*dp[i-j][1]%ljc);
//			if (i==n) add(dp[i][1],(j>1?h[j-2]:0)*dp[i-j][1]%ljc);
			else add(dp[i][0],h[j-1]*dp[i-j][1]%ljc);
		}
	}
	printf("%lld\n",(fast_pow(2,n,ljc)-dp[n][0]-dp[n][1]+ljc+ljc)%ljc);
	return 0;
}

