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<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
#define N 5005
const int mod=1e9+7;
inline int read(){
	int x=0,f=1;
	char c=getchar();
	while(c<'0'||c>'9'){
		if(c=='-')f=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		x=(x<<1)+(x<<3)+c-'0';
		c=getchar();
	}
	return x*f;
}
int n,f[N][2],dp[N][2],A,B,ans;
#define ck(x) (x>=mod?x-mod:x) 
int qpow(int a,int b){
	int ans=1;
	while(b){
		if(b&1)ans=1LL*ans*a%mod;
		a=1LL*a*a%mod;
		b>>=1;
	}
	return ans;
}
int main(){
	n=read(),A=read(),B=read();
	if(A>B)swap(A,B);
	f[0][0]=f[0][1]=1;
	for(int i=1;i<B;++i){
		for(int j=A;j<=i;++j){
			f[i][0]=ck(f[i][0]+f[i-j][1]);
		}
		for(int j=1;j<=i;++j){
			f[i][1]=ck(f[i][1]+f[i-j][0]);
		}
	}
	for(int i=1;i<n;++i){
		dp[i][0]+=(i<A);
		dp[i][1]+=(i<B?f[i][1]:0);
		for(int j=1;j<min(i,A);++j){
			dp[i][0]=ck(dp[i][0]+dp[i-j][1]);
		}
		for(int j=1;j<min(i,B);++j){
			dp[i][1]=(dp[i][1]+1LL*dp[i-j][0]*f[j-1][1])%mod;
		}
		if(n-i<A)ans=ck(ans+dp[i][1]);
		if(n-i<B)ans=(ans+1LL*dp[i][0]*f[n-i][1])%mod;
	}
	printf("%d\n",(qpow(2,n)-ans+mod)%mod);	
	return 0;
}
