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 mp make_pair
#define pb push_back
#define all(x) x.begin(),x.end()
#define cmin(a,b) (a>b?a=b:a)
#define cmax(a,b) (a<b?a=b:a)
#define mem(a,k) memset(a,k,sizeof(a))
#define lop(i,s,t) for(int i=s;i<(t);++i)
#define rep(i,s,t) for(int i=s;i<=(t);++i)
#define dec(i,s,t) for(int i=s;i>=(t);--i)
#define fore(i,v) for(int i=g[v],d=es[i].d;i;i=es[i].nxt,d=es[i].d)
using namespace std;

#define Pr(f,...) fprintf(stderr,f,##__VA_ARGS__),fflush(stderr)

typedef long long ll;

template<typename T>
void read(T &x){
	x=0; 
	char c;
	for(c=getchar();!isdigit(c);c=getchar()); 
	for(;isdigit(c);c=getchar())x=x*10+c-'0'; 
}

const int N=5005,P=1e9+7,oo=P;

int mul(int a,int b){ return 1ll*a*b%P; }
int add(int a,int b){ a+=b; return a>=P?a-P:a; }
void upd(int &a,int b){ a=add(a,b); }
int sub(int a,int b){ a-=b; return a<0?a+P:a; }
int gcd(int a,int b){ return !b?a:gcd(b,a%b); }

int n,a,b,f[N][2],g[N][2],g2[N][2],ans;

int main(int argc,char *argv[]){
#ifdef CURIOUSCAT
	freopen("d.in","r",stdin); 
#endif
	scanf("%d%d%d",&n,&a,&b);
	if(a>b)swap(a,b); 
	g[0][0]=1;
	lop(i,0,b-1){
		//add1
		rep(j,1,b-1-i)upd(g[i+j][1],g[i][0]);
		//add0
		rep(j,a,b-1-i)upd(g[i+j][0],g[i][1]); 
	}
	g2[0][1]=1;
	lop(i,0,b-1){
		//add1
		rep(j,1,b-1-i)upd(g2[i+j][1],g2[i][0]);
		//add0
		rep(j,a,b-1-i)upd(g2[i+j][0],g2[i][1]); 
	}
	f[0][0]=1,f[0][1]=1;
	rep(j,a,n-1)f[j][1]=g2[j][1];
	f[n][1]=g2[n][1]; 
	f[n][0]=g2[n][0];
	lop(i,0,n){
		//add0
		lop(j,1,min(a,n-i+1)){
			upd(f[i+j][0],f[i][1]);
		}
		lop(j,1,min(b,n-i+1)){
			upd(f[i+j][1],mul(g[j][1],f[i][0])); 
		}
		upd(f[n][0],mul(g[n-i][0],f[i][0])); 
	}
	ans=1; 
	rep(i,1,n)ans=mul(ans,2); 
	ans=sub(ans,add(f[n][1],f[n][0])); 
	cout<<ans<<endl;
	return 0;
}
