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 long double ld;
#define mp make_pair
#define PI pair<ll,ll>
#define poly vector<int>
#define For(i,l,r) for(int i=(int)(l);i<=(int)(r);i++)
#define Rep(i,r,l) for(int i=(int)(r);i>=(int)(l);i--)
#define pb push_back
#define fi first
#define se second
#define mem(a) (memset(a,0,sizeof(a)))
inline char gc(){
    static char buf[100000],*p1=buf,*p2=buf;
    return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
#define gc getchar
inline ll read(){
	ll x = 0; char ch = gc(); bool positive = 1;
	for (; !isdigit(ch); ch = gc())	if (ch == '-')	positive = 0;
	for (; isdigit(ch); ch = gc())	x = x * 10 + ch - '0';
	return positive ? x : -x;
}
inline void write(ll a){
    if(a<0){
    	a=-a; putchar('-');
	}
    if(a>=10)write(a/10);
    putchar('0'+a%10);
}
inline void writeln(ll a){write(a); puts("");}
inline void wri(ll a){write(a); putchar(' ');}
ll rnd(){
	ull ans=0;
	For(i,0,4)ans=ans<<15^rand();
	return ans%((ull)1<<63);
}
const int N=5005,mod=1e9+7;
int f[N][N],g[N][N],s[N][N],sum;
int a[2];
inline void add(int &a,int b){
	a+=b; if(a>=mod)a-=mod;
}
int main(){
	#ifdef Brollan
		freopen("1.in","r",stdin);
	#endif
	int n=read(),x=read(),y=read();
	if(x>y)swap(x,y);
	f[0][0]=1;
	For(i,0,n){
		f[i][y]=g[i][y]=0;
		if(i>=x){
			For(j,0,i)if(i>=x){
				g[i][j]=s[i-x][i-j];
				//cout<<i<<" "<<j<<" "<<s[i-x][i-j]<<" "<<sum<<endl;
				add(sum,mod-f[i-x][j]);
			}
		}
		g[i][0]=sum;
		For(j,0,min(i,y-1)){
			//cout<<f[i][j]<<" "<<g[i][j]<<" "<<i<<" "<<j<<" "<<endl;
			add(f[i+1][j+1],g[i][j]);
			add(f[i+1][j+1],f[i][j]);
			if(i)s[i][i-j]=s[i-1][i-j];
			add(s[i][i-j],f[i][j]);
			add(sum,f[i][j]);
		}
	}
	ll ans=1;
	For(i,1,n)ans=ans*2%mod;
	For(i,0,y-1)ans=(ans-f[n][i]-g[n][i]+mod*2)%mod;
	cout<<ans<<endl;
}
/*
dp[i][j]->dp[i+...][0]
不妨令 1 全不满
满的0全改为1 
11111100111110011111
...10011100010001
*/