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 <iostream>
#define debug(...) fprintf(stderr,__VA_ARGS__)
#define upd(a,b) a=add(a+b)
using namespace std;
inline char nc() {
//	return getchar();
	static char buf[100000],*l=buf,*r=buf;
	return l==r&&(r=(l=buf)+fread(buf,1,100000,stdin),l==r)?EOF:*l++;
}
template<class T> void read(T &x) {
	x=0; int f=1,ch=nc();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=nc();}
	while(ch>='0'&&ch<='9'){x=x*10-'0'+ch;ch=nc();}
	x*=f;
}
typedef long long ll;
const int mod=1e9+7;
const int maxn=5000+5;
int n,A,B;
int f[maxn][2],g[maxn][2];
int dp[maxn][2][2];
inline int add(int x) {return x>=mod?x-mod:x;}
void DP(int dp[maxn][2]) {
	for(int i=0;i<n;++i) {
		upd(dp[i+1][1],dp[i][0]);
		upd(dp[i+1][1],dp[i][1]);
		for(int k=A;i+k<=n;++k) upd(dp[i+k][0],dp[i][1]);
	}
}
int main() {
	read(n),read(A),read(B);
	if(A>B) swap(A,B);
	f[0][0]=1,DP(f);
	g[0][0]=1;
	for(int i=A;i<=n;++i) g[i][0]=1;
	DP(g);
	dp[n][1][0]=g[n][0];
	for(int i=1;i<=n;++i) dp[i][i>=B][1]=g[i][1];
	for(int i=1;i<A;++i) dp[i][0][0]=1;
	for(int i=1;i<=n;++i) for(int k=0;k<2;++k) {
		for(int j=1;j<A&&i+j<=n;++j) upd(dp[i+j][k][0],dp[i][k][1]);
		for(int j=1;i+j<=n;++j) {
			int r=f[j][1]; if(i+j==n) upd(r,f[j][0]);
			upd(dp[i+j][k||j>=B][1],(ll)dp[i][k][0]*r%mod);
		}
	}
	printf("%d\n",add(dp[n][1][0]+dp[n][1][1]));
	return 0;
}