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 ull unsigned ll
#define uint unsigned
#define pii pair<int,int>
#define pll pair<ll,ll>
#define IT iterator
#define PB push_back
#define fi first
#define se second
#define For(i,j,k) for (int i=(int)(j);i<=(int)(k);i++)
#define Rep(i,j,k) for (int i=(int)(j);i>=(int)(k);i--)
#define CLR(a,v) memset(a,v,sizeof(a));
#define CPY(a,b) memcpy(a,b,sizeof(a));
#define debug puts("wzpakking")
#define y1 ysghysgsygsh
using namespace std;
const int N=5005;
const int mo=1000000007;
int n,A,B,f[N][N],g[N][N],h[N*2];
void F1(){
	f[1][1]=2;
	For(i,1,n) For(j,1,A-1){
		f[i][j+1]=(f[i][j+1]+f[i-1][j])%mo;
		f[i][1]=(f[i][1]+f[i-1][j])%mo;
	}
	int ans=1;
	For(i,1,n) ans=ans*2%mo;
	For(j,1,A-1) ans=(ans+mo-f[n][j])%mo;
	cout<<ans<<endl;
}
void F2(){
	f[0][0]=1;
	For(i,0,n+1){
		if (i) h[i]=(h[i]+h[i-1])%mo;
		f[i][1]=(f[i][1]+h[i])%mo;
		For(j,0,B){
			if (i&&j) g[i][j]=(g[i][j]+g[i-1][j-1])%mo;
			f[i][j]=(f[i][j]+g[i][j])%mo;
			if (j==B) continue;
			f[i+1][j+1]=(f[i+1][j+1]+f[i][j])%mo;
			h[i+2]=(h[i+2]+f[i][j])%mo;
			h[i+A+1]=(h[i+A+1]+mo-f[i][j])%mo;
			if (i+A+1<=n+1&&j+A+1<=n)
			g[i+A+1][j+A+1]=(g[i+A+1][j+A+1]+f[i][j])%mo;
		}
		//cout<<i<<' '<<j<<' '<<f[i][j]<<endl;
	}
	int ans=1;
	For(i,1,n) ans=2*ans%mo;
	For(j,1,B) ans=(ans+mo-f[n+1][j])%mo;
	cout<<ans<<endl;
}
/*
11:2
01:1
*/
int main(){
	scanf("%d%d%d",&n,&A,&B);
	if (A>B) swap(A,B);
	if (A==B) F1();
	else F2();
}
/*
>_<
*/
