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>
#pragma GCC optimize ("O2,unroll-loops")
//#pragma GCC optimize("no-stack-protector,fast-math")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int> piii;
typedef pair<ll, ll> pll;
#define debug(x) cerr<<#x<<'='<<(x)<<endl;
#define debugp(x) cerr<<#x<<"= {"<<(x.first)<<", "<<(x.second)<<"}"<<endl;
#define debug2(x, y) cerr<<"{"<<#x<<", "<<#y<<"} = {"<<(x)<<", "<<(y)<<"}"<<endl;
#define debugv(v) {cerr<<#v<<" : ";for (auto x:v) cerr<<x<<' ';cerr<<endl;}
#define all(x) x.begin(), x.end()
#define pb push_back
#define kill(x) return cout<<x<<'\n', 0;

const int inf=1000000010;
const ll INF=10000000000000010LL;
const int mod=1000000007;
const int MAXN=5010;

ll n, A, B, u, v, x, y, t, a, b, ans;
ll dp[MAXN][MAXN], sum[MAXN];

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	cin>>n>>A>>B;
	if (A>B) swap(A, B);
	dp[0][0]=sum[0]=1;
	for (int i=1; i<=n; i++){
		for (int x=2; x<=A && x<=i; x++)
			dp[i][0]=(dp[i][0] + sum[i-x] - dp[i-x][B-1])%mod;
		if (i<A) dp[i][0]++;
		
		for (int j=1; j<B && j<=i; j++){
			dp[i][j]=dp[i-1][j-1];
			if (j<A+1) continue ;
			
			if (j<=A+1 || i==j){
				for (int y=A+1; y<=j; y++)
					dp[i][j]+=dp[i-y][j-y];
			}
			else if (j>A+1){
				dp[i][j]+=dp[i-1][j-1]-dp[i-2][j-2];
				dp[i][j]+=dp[i-A-1][j-A-1];
			}
			
			dp[i][j]%=mod;
		}
		if (A<=i && i<B) dp[i][i]++;
		
		for (int j=0; j<B; j++) sum[i]=(sum[i] + dp[i][j])%mod;
	}
	
	ans=1;
	for (int i=1; i<=n; i++) ans=ans*2%mod;
	ans=(ans-sum[n])%mod;
	if (ans<0) ans+=mod;
	cout<<ans<<"\n";
	
	return 0;
}
