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>
#define For(i,x,y) for (register int i=(x);i<=(y);i++)
#define FOR(i,x,y) for (register int i=(x);i<(y);i++)
#define Dow(i,x,y) for (register int i=(x);i>=(y);i--)
#define Debug(v) for (auto i:v) printf("%lld ",i);puts("")
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define ep emplace_back
#define siz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define fil(a,b) memset((a),(b),sizeof(a))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pa;
typedef pair<ll,ll> PA;
typedef vector<int> poly;
inline ll read(){
    ll x=0,f=1;char c=getchar();
    while ((c<'0'||c>'9')&&(c!='-')) c=getchar();
    if (c=='-') f=-1,c=getchar();
    while (c>='0'&&c<='9') x=x*10+c-'0',c=getchar();
    return x*f;
}

const int N = 5050, mod = 1e9+7;
int n,A,B,f[N][2],g[N][2];

inline int Mod(int x){
	return x>=mod?x-mod:x;
}
inline void upd(int &x,int y){
	x+=y;
	if (x>=mod) x-=mod;
}

int main(){
	n=read(),A=read(),B=read();
	if (A>B) swap(A,B);
	g[0][0]=1;
	FOR(i,1,B){
		For(j,1,i) upd(g[i][1],g[i-j][0]);
		For(j,A,i) upd(g[i][0],g[i-j][1]);
	}
	f[0][0]=f[0][1]=1;
	For(i,1,n){
		For(j,1,min(i,A-1)) upd(f[i][0],f[i-j][1]);
		For(j,1,min(i,B-1)){
			f[i][1]=(f[i][1]+1ll*f[i-j][0]*g[j][1])%mod;
			if (i==j) upd(f[i][1],g[i][0]);
			if (i==n) f[i][0]=(f[i][0]+1ll*g[j][0]*f[i-j][0])%mod;
		}
	}
	int ans=1;
	For(i,1,n) ans=2*ans%mod;
	printf("%d\n",Mod(ans+mod-Mod(f[n][0]+f[n][1])));
}