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<iostream>
#include<cstring>
#include<cstdio>
#include<vector>
#include<algorithm>

using namespace std;

#define LL long long
#define fgx cerr<<"--------------"<<endl;
#define dgx cerr<<"=============="<<endl;

inline int read(){
	int x=0,f=1;char c=getchar();
	for(;!isdigit(c);c=getchar()) if(c=='-') f=-1;
	for(;isdigit(c);c=getchar()) x=x*10+c-'0';
	return x*f;
}
const int MAXN = 100010;
const int INF = 2147483600;
const LL Mod = 1e9+7;

int N,A,B; LL f[2][5010][5010],h[2][2][5010],g[5010][5010];

inline void Add(LL &a,LL b){ a=(a+b>=Mod?a+b-Mod:a+b); }

int main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	N=read(),A=read(),B=read(); LL pw2=1;
	for(int i=1;i<=N;i++) pw2=pw2*2%Mod;
	f[1][1][0]=1; f[0][1][1]=1; if(A>B) swap(A,B);
	for(int x=0;x<2;x++)
		for(int i=1;i<B;i++){
			for(int j=0;j<=i;j++){
				if(j>=A) Add(f[x][i+1][0],f[x][i][j]);
				Add(f[x][i+1][j+1],f[x][i][j]);
			} Add(f[x][i+1][0],f[x][i][0]);
		} 
	for(int x=0;x<2;x++) 
		for(int i=1;i<B;i++){
			h[x][1][i]=f[x][i][0];
			for(int j=A;j<=i;j++) Add(h[x][0][i],f[x][i][j]);
		}
	g[0][0]=1;
	for(int i=0;i<N;i++){
		LL g0=0;
		for(int j=1;j<=min(i,A-1);j++) Add(g0,g[i][j]);
		for(int j=0;j<=min(i,A-1);j++) Add(g[i+1][j+1],g[i][j]);
		for(int j=1;j<B&&j+i<=N;j++){
			if(!i&&i+j==N){ Add(g[i+j][0],(h[0][0][j]+h[1][1][j]+h[1][0][j]+h[0][1][j])%Mod); continue; }
			if(!i){ Add(g[i+j][0],(h[0][1][j]+h[1][1][j])%Mod); continue; }
			if(i+j==N){ Add(g[i+j][0],g0*(h[1][0][j]+h[1][1][j])%Mod); continue;}
			Add(g[i+j][0],g0*h[1][1][j]%Mod);
		}
	} for(int i=0;i<A;i++) pw2-=g[N][i]; pw2=pw2%Mod+Mod; pw2%=Mod;
	printf("%lld\n",pw2);
	return 0;
}


