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 rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

template<class T> void read(T &x){
	int f=0; x=0; char ch=getchar();
	for(;!isdigit(ch);ch=getchar()) f|=(ch=='-');
	for(;isdigit(ch);ch=getchar()) x=x*10+ch-'0';
	if(f) x=-x;
}

const int N=5005,mod=1e9+7;
int f[N][N][2],g[N][N],h[N],n,A,B;

void add(int &x,int y){
	x=(x+y>=mod?x+y-mod:x+y);
}

int main(){
	read(n),read(A),read(B);
	if(A<B) swap(A,B);

	add(f[1][1][0],1);
	rep(i,1,n){
		if(i<B) add(f[i][0][1],1);
		else add(f[i][i][1],1);
	}

	rep(i,1,n){
		add(h[i],h[i-1]);
		add(f[i][0][1],h[i]);

		add(f[i+1][1][0],f[i][0][1]);
		
		rep(j,1,A-1){
			add(g[i][j],g[i-1][j-1]);
			add(f[i][j][1],g[i][j]);

			add(h[i+1],f[i][j][0]);
			add(h[min(n+1,i+B)],mod-f[i][j][0]);
			add(f[i+1][j+1][0],f[i][j][0]);
			if(i+B<=n){
				add(g[i+B][j+B],f[i][j][0]);
			}
						
			add(f[i+1][j+1][0],f[i][j][1]);
		}
	}

	int ans=0,tot=1;
	rep(i,1,n){
		tot=2ll*tot%mod;
	}
	rep(j,0,A-1){
		add(ans,f[n][j][0]);
		add(ans,f[n][j][1]);
	}
	ans=((tot+mod-ans)%mod+mod)%mod;
	cout<<ans<<endl;

	return 0;
}
