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<cstdio>
#include<cmath>
#include<algorithm>
#include<cstdlib>
#include<cstring>
using namespace std;
inline int read()
{
	int x=0,f=1;char ch=getchar();
	while(ch<'0' || ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0' && ch<='9')x=x*10+ch-'0',ch=getchar();
	return x*f;
}
int stack[20];
inline void write(int x)
{
	if(x<0){putchar('-');x=-x;}
	if(!x){putchar('0');return;}
	int top=0;
	while(x)stack[++top]=x%10,x/=10;
	while(top)putchar(stack[top--]+'0');
}
inline void pr1(int x){write(x),putchar(' ');}
inline void pr2(int x){write(x),puts("");}
const int mod=1e9+7;
inline int ad(int x){return x>=mod?x-mod:x;}
inline int dec(int x){return x<0?x+mod:x;}
int f[5010][2],g[5010][2];
int main()
{
	//freopen("a.in","r",stdin);
	//freopen("a.out","w",stdout);
	int n=read(),a=read(),b=read();
	if(a>b)swap(a,b);
	g[1][1]=1;
	for(int i=2;i<b;i++)
	{
		g[i][1]=ad(g[i-1][0]+g[i-1][1]);
		for(int j=a;j<i;j++)g[i][0]=ad(g[i][0]+g[i-j][1]);
	}
	f[0][0]=f[0][1]=1;
	int tot=1;
	for(int i=1;i<=n;i++)
	{
		tot=ad(2*tot);
		for(int j=1;j<min(a,i+1);j++)f[i][0]=ad(f[i][0]+f[i-j][1]);
		for(int j=1;j<min(b,i+1);j++)
		{
			if(i==n)f[i][0]=ad(f[i][0]+1LL*f[i-j][0]*g[j][0]%mod);
			if(i==j)f[i][1]=ad(f[i][1]+ad(g[i][0]+g[i][1]));
			else f[i][1]=ad(f[i][1]+1LL*f[i-j][0]*g[j][1]%mod);
		}
	}pr2(dec(tot-ad(f[n][0]+f[n][1])));
	return 0;
}