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;
template<typename T>inline T read(){
	T f=0,x=0;char c=getchar();
	while(!isdigit(c)) f=c=='-',c=getchar();
	while(isdigit(c)) x=x*10+c-48,c=getchar();
	return f?-x:x;
}
namespace run{
	const int N=10009,mod=1e9+7;
	inline int add(int x,int y){return x+y>=mod?x-mod+y:x+y;}
	inline int sub(int x,int y){return x>=y?x-y:x+mod-y;}
	inline int qpow(int x,int y){
		int ret=1;
		while(y){
			if(y&1) ret=1LL*x*ret%mod;
			x=1LL*x*x%mod,y>>=1;
		}
		return ret;
	}
	int g[2][N],f[N],h[N],n,a,b;
	int main(){
		n=read<int>(),a=read<int>(),b=read<int>();
		if(a<b) swap(a,b);

		g[1][0]=1;
		for(int i=1;i<a;i++){
			for(int j=b;j<i;j++) g[1][i]=add(g[1][i],g[0][i-j]);
			for(int j=1;j<=i;j++) g[0][i]=add(g[0][i],g[1][i-j]);
		//	cout<<i<<" "<<g[0][i]<<" "<<g[1][i]<<endl;
			for(int j=1;j<b;j++) h[i+j]=add(h[i+j],g[0][i]);
		}
	//	for(int i=1;i<=n;i++) cout<<h[i]<<" ";cout<<endl;
		for(int i=0;i<b;i++) f[i]=1;
		for(int i=1;i<a;i++)
			for(int j=1;j<b;j++) f[i+j]=add(f[i+j],g[1][i]);
		for(int i=1;i<=n;i++)
			for(int j=1;j<min(i+1,a+b-1);j++) f[i]=add(f[i],1LL*f[i-j]*h[j]%mod);
	//	for(int i=1;i<=n;i++) cout<<f[i]<<" ";
	//	cout<<endl;
		
		int ans=0;
		for(int i=n-a+1;i<=n;i++) ans=add(ans,1LL*f[i]*add(g[0][n-i],g[1][n-i])%mod);
		printf("%d\n",sub(qpow(2,n),ans));
		return 0;
	}
}
int main(){
#ifdef my
	freopen(".in","r",stdin);
	freopen(".out","w",stdout);
#endif
	return run::main();
}