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;
typedef unsigned long long ull;
typedef pair<ll,int> pii;
#define x first
#define y second
#define mp make_pair
#define pb push_back
template <typename TYPE> inline void chkmax(TYPE &x,TYPE y){x<y?x=y:0;}
template <typename TYPE> inline void chkmin(TYPE &x,TYPE y){y<x?x=y:0;}
template <typename TYPE> void readint(TYPE &x)
{
    x=0;int f=1;char c;
    for(c=getchar();!isdigit(c);c=getchar())if(c=='-')f=-1;
    for(;isdigit(c);c=getchar())x=x*10+c-'0';
    x*=f;
}
const int MAXN=5005,MOD=1000000007;
inline int dmy(int x){return x>=MOD?x-MOD:x;}
int qmi(int x,int y)
{
	int ans=1;
	for(;y;y>>=1,x=1ll*x*x%MOD)
		if(y&1)ans=1ll*ans*x%MOD;
	return ans;
}

int n,A,B,g[MAXN],f[MAXN][MAXN][2];

int main()
{
	readint(n),readint(A),readint(B);
	if(A>B)swap(A,B);
	if(A==1)return 0*printf("%d\n",qmi(2,n));
	g[1]=g[2]=1;
	for(int i=3;i<=n+2;++i)
	{
		g[i]=g[i-1];
		for(int j=A+1;j<i;++j)
			g[i]=dmy(g[i]+g[i-j]);
	}
	f[1][1][0]=f[1][1][1]=1;
	for(int i=2;i<=n;++i)
	{
		for(int j=1;j<=i;++j)
		{
			if(j>=A)f[i][j][0]=0;
			else if(j>1)f[i][j][0]=f[i-1][j-1][0];
			else for(int k=1;k<i;++k)f[i][j][0]=(f[i][j][0]+1ll*f[i-1][k][1]*(i-1==k?g[k+1]:g[k]))%MOD;
			if(j>=B)f[i][j][1]=0;
			else if(j>1)f[i][j][1]=f[i-1][j-1][1];
			else for(int k=1;k<i;++k)f[i][j][1]=dmy(f[i][j][1]+f[i-1][k][0]);
		}
	}
	int ans=0;
	for(int j=1;j<=n+1;++j)ans=(ans+f[n][j][0]+1ll*f[n][j][1]*(n==j?g[j+2]:g[j+1]))%MOD;
	printf("%d\n",dmy(qmi(2,n)-ans+MOD));
	return 0;
}