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 FAST ios_base::sync_with_stdio(false); cin.tie(0);
#define pb push_back
#define eb emplace_back
#define ins insert
#define f first
#define s second
#define cbr cerr<<"hi\n"
#define mmst(x, v) memset((x), v, sizeof ((x)))
#define siz(x) ll(x.size())
#define all(x) (x).begin(), (x).end()
#define lbd(x,y) (lower_bound(all(x),y)-x.begin())
#define ubd(x,y) (upper_bound(all(x),y)-x.begin())
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());    //can be used by calling rng() or shuffle(A, A+n, rng)
inline long long rand(long long x, long long y) { return rng() % (y+1-x) + x; } //inclusivesss
string inline to_string(char c) {string s(1,c);return s;} template<typename T> inline T gcd(T a,T b){ return a==0?llabs(b):gcd(b%a,a); }

using ll=long long; 
using ld=long double;
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
using pi=pair<ll,ll>; using spi=pair<ll,pi>; using dpi=pair<pi,pi>; 

#define LLINF ((long long)1e18)
#define INF int(1e9+1e6)
#define MAXN (5006)
ll n, a, b, dp[MAXN][MAXN][3], mod=1e9+7, ans=1, sum[MAXN];
int main(){
	FAST
	cin>>n>>a>>b;
	if(a>b)swap(a,b);
	dp[0][0][2]=1, sum[0]=1;
	FOR(i,1,n){
		FOR(j,0,b-1){
			if(j==0) {
				FOR(k,1,min(a-1,i)) dp[i][j][0] += sum[i-k], dp[i][j][0] %= mod;
			} else{
				dp[i][j][1] += dp[i-1][j-1][1] + (j-a >= 0 && i-a >= 0 ? dp[i-a][j-a][2] : 0), dp[i][j][1] %= mod;
				dp[i][j][2] += dp[i-1][j-1][2] + dp[i-1][j-1][1] + dp[i-1][j-1][0], dp[i][j][2] %= mod;
			}
			sum[i] += dp[i][j][2], sum[i] %= mod;
		}
	}
	FOR(i,1,n) ans*=2,ans%=mod;
	FOR(j,0,b-1)ans-=dp[n][j][0]+dp[n][j][1]+dp[n][j][2],ans+=mod*3,ans%=mod;
	cout<<ans<<'\n';
}
