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>
using namespace std;
typedef long long LL;
const int MOD=1e9+7;
int add(int a,int b){
	return a+b>=MOD?a+b-MOD:a+b;
}
int sub(int a,int b){
	return a-b>=0?a-b:a-b+MOD;
}
void dadd(int &a,int b){
	a=add(a,b);
}
int mul(int a,int b){
	return (LL)a*b%MOD;
}
const int N=5050;
int f[N][N+1]={0};
int g[N][N+1]={0};
int h[N][N+1]={0};
int main(){
	ios::sync_with_stdio(false);
	int n,a,b;
	cin>>n>>a>>b;
	if(a>b)swap(a,b);
	f[n+1][b]=1;
	g[n+1][b]=1;
	h[n+1][b]=1;
	for(int i=n;i>=1;i--){
		for(int j=0;j<b-1;j++){
			int &ans=f[i][j];
			ans=f[i+1][min(j+1,b)];
			dadd(ans,h[i+2][0]);
			int s=i+a+1;
			if(s<=n+1){
				dadd(ans,sub(0,h[s][0]));
				int t=max(s-1,min(b+i-j,n+1))+1;
				dadd(ans,g[s][j-i+s]);
				if(t<=n+1){
					dadd(ans,g[t][j-i+t]);
					dadd(ans,h[t][b]);
				}
			}
		}
		for(int j=b-1;j<=b;j++){
			f[i][j]=h[i+1][b];
		}
		for(int j=0;j<=b;j++){
			g[i][j]=add(g[i+1][j+1],f[i][j]);
		}
		for(int j=0;j<=b;j++){
			h[i][j]=add(h[i+1][j],f[i][j]);
		}
	}
	int ans=0;
	for(int k=0;k+1<=n+1;k++){
		dadd(ans,f[k+1][k>=a?min(k,b):0]);
	}
	printf("%d\n",ans);
	return 0;
}