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;
#define rep(i, n) for(long long i=0; i<(long long)(n); i++)
#define REP(i, k, n) for(long long i=(long long)(k); i<(long long)(n); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
#define PQ(T) priority_queue<T>
#define PQS(T) priority_queue<T, vector<T>, greater<T> >
#define deci cout << fixed << setprecision(15);
typedef long long ll;
const ll inf = 1020304050607080910;
const int INF = 2000000000;
const ll mod = 1000000007;
typedef pair<ll, ll> P;
typedef pair<ll, P> PP;
template<class T> bool chmin(T&x,T y){if(x>y){x=y;return true;}return false;}
template<class T> bool chmax(T&x,T y){if(x<y){x=y;return true;}return false;}
ll gcd(ll x,ll y){if(x>y)swap(x, y);while(x!=0){y%=x;swap(x, y);}return y;}
ll mpow(ll x,ll r){if(r==0)return 1;if(r%2==1){return x*mpow(x,r-1)%mod;}else{ll aa=mpow(x,r/2);return aa*aa%mod;}}

int main(){
	int N, A, B; cin >> N >> A >> B;
	if(A<B) swap(A, B);
	ll dpb[N+1], dp[N+1], sum[N+1], sum2[N+1];
	rep(i, B) dpb[i] = 1;
	for(int i=B; i<=N; i++){
		dpb[i] = dpb[i-1];
		for(int j=B; j<=i; j++){
			if(j==i) dpb[i] = (dpb[i] + 1) % mod;
			else dpb[i] = (dpb[i] + dpb[i-j-1]) % mod;
		}
	}
	sum2[0] = dpb[0];
	rep(i, N) sum2[i+1] = (sum2[i] + dpb[i+1]) % mod;
	dp[0] = 0, sum[0] = 0;
	for(int i=1; i<=N; i++){
		dp[i] = 0;
		for(int j=1; j<=min(i-1, A-1); j++){
			ll s, cnt = 0;
			if(j==i-1){ dp[i] = (dp[i] + dpb[max(0, j-2)]) % mod; continue; }
			if(i-(j+B-1)<=A-1){
				if(i-j-B+1<=0){
					int l = min(A-1, i-j-1);
					cnt = (cnt + sum2[l-1]+1)%mod;
				}else{
					int l = min(i-j-1, A-1);
					cnt = (cnt + sum2[l-1] + mod - sum2[i-j-B]+dpb[i-j-B])%mod;
				}
			}
			if(i-j-B+1 < 0) s = sum[i-j-1];
			else s = (sum[i-j-1] + mod - sum[i-j-B+1] + dp[i-j-B+1]) % mod;
			cnt = (cnt + s) % mod;
			if(j==1) dp[i] = (dp[i] + cnt) % mod;
			else dp[i] = (dp[i] + dpb[j-2]*cnt) % mod;
		}
		sum[i] = (sum[i-1] + dp[i]) % mod;
	}
	ll ans = mpow(2, N);
	ll c = 0;
	for(int i=0; i<=A-1; i++){
		for(int j=1; j<=B-1; j++){
			if(i+j>N) continue;
			if(N-i-j<=A-1){
				c = (c + dpb[max(0, i-1)]*dpb[max(0, N-i-j-1)]) % mod;
			}
			c = (c + dpb[max(0, i-1)]*dp[N-i-j])%mod;
		}
	}
	cout << (ans - c + 2*mod) % mod << endl;
	return 0;
}
