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 ld long double
#define db double
#define pint pair<int,int>
#define mk(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define eb(x,y) emplace_back(x,y)
#define fi first
#define se second
#define Rep(x,y,z) for(int x=y;x<=z;x++)
#define Red(x,y,z) for(int x=y;x>=z;x--)
using namespace std;
const int MAXN=5005,Mod=1e9+7;
char buf[1<<12],*pp1=buf,*pp2=buf,nc;int ny;
inline char gc() {return pp1==pp2&&(pp2=(pp1=buf)+fread(buf,1,1<<12,stdin),pp1==pp2)?EOF:*pp1++;}
//inline char gc(){return getchar();}
inline int read(){
	int x=0;for(ny=1;nc=gc(),(nc<48||nc>57)&&nc!=EOF;)if(nc==45)ny=-1;if(nc<0)return nc;
	for(x=nc-48;nc=gc(),47<nc&&nc<58&&nc!=EOF;x=(x<<3)+(x<<1)+(nc^48));return x*ny;
}
int n,a,b,Sum[MAXN],f[MAXN][MAXN],tmp[MAXN][MAXN];
inline void Add(int&x,int y){x+=y,x>=Mod?x-=Mod:0;}
inline int Fp(int x,int k){int ans=1;for(;k;k>>=1,x=1ll*x*x%Mod)if(k&1)ans=1ll*ans*x%Mod;return ans;}
int main(){
//	freopen("std.in","r",stdin);
//	freopen("std.out","w",stdout);
	n=read(),a=read(),b=read();if(a>b)swap(a,b);
	f[0][0]=1;
	Rep(i,0,n){
		if(i)Add(Sum[i],Sum[i-1]);Add(f[i][1],Sum[i]);
		Rep(j,1,b)Add(f[i][j],tmp[i][j]),Add(tmp[i+1][min(j+1,b)],tmp[i][j]);
		if(i==n)break;
		Rep(j,0,b-1){
			Add(f[i+1][j+1],f[i][j]),Add(Sum[i+2],f[i][j]);
			if(i+a+1<=n)Add(Sum[i+a+1],Mod-f[i][j]),Add(tmp[i+a+1][min(j+a+1,b)],f[i][j]);
			if(n-i>=a)Add(f[n][min(n-i+j,b)],f[i][j]);
		}
	}int ans=0;
	Rep(i,1,n)ans=(ans+1ll*Fp(2,n-i)*f[i][b])%Mod;
	cout<<ans<<'\n';
	return 0;
}


