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 cs const
#define pb push_back
using namespace std;
cs int Mod = 1e9 + 7;
int add(int a, int b){ return a + b >= Mod ? a + b - Mod : a + b; }
int dec(int a, int b){ return a - b < 0 ? a - b + Mod : a - b; }
int mul(int a, int b){ return 1ll * a * b % Mod; }
void Add(int &a, int b){ a = add(a,b); }
void Mul(int &a, int b){ a = mul(a,b); }
void Dec(int &a, int b){ a = dec(a,b); }
int ksm(int a, int b){ int as=1; for(;b;b>>=1,Mul(a,a))if(b&1)Mul(as,a); return as; }
cs int N = 5e3 + 50;
int n, A, B, dp[N][2], f[N][2];
int main(){
	#ifdef FSYolanda
	freopen("1.in","r",stdin);
	#endif
	scanf("%d%d%d",&n,&A,&B);
	if(A > B) swap(A,B);
	f[1][1] = 1;
	for(int i=2; i<B; i++){
		Add(f[i][1],add(f[i-1][0],f[i-1][1]));
		for(int j=A; j<i; j++)
		Add(f[i][0],f[i-j][1]);
	} dp[0][0] = dp[0][1] = 1;
	for(int i=1; i<=n; i++){
		for(int j=1; j<min(A,i+1); j++)
		Add(dp[i][0],dp[i-j][1]);
		for(int j=1; j<min(B,i+1); j++){
			if(i==n)Add(dp[i][0],mul(dp[i-j][0],f[j][0]));
			if(i==j)Add(dp[i][1],add(f[j][0],f[j][1]));
			else Add(dp[i][1],mul(dp[i-j][0],f[j][1]));
		}
	} cout<<dec(ksm(2,n),add(dp[n][0],dp[n][1]));
	return 0;
}