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 ll long long
#define sd(x) scanf("%d", &(x))
#define pii pair<int, int>
#define F first
#define S second
#define all(c) ((c).begin()), ((c).end())
#define sz(x) ((int)(x).size())
#define ld long double

template<class T,class U>
ostream& operator<<(ostream& os,const pair<T,U>& p){
	os<<"("<<p.first<<", "<<p.second<<")";
	return os;
}

template<class T>
ostream& operator <<(ostream& os,const vector<T>& v){
	os<<"{";
	for(int i = 0;i < (int)v.size(); i++){
		if(i)os<<", ";
		os<<v[i];
	}
	os<<"}";
	return os;
}

#ifdef LOCAL
#define cerr cout
#else
#endif

#define TRACE

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
	cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
const int N = 5005;
int dp[N][N], dp2[N][N], prefdp[N];
int p2[N];
const int mod = 1e9 + 7;
inline int add(int x, int y){ x += y; if(x >= mod) x -= mod; return x;}
inline int sub(int x, int y){ x -= y; if(x < 0) x += mod; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % mod;}
inline int powr(int a, ll b){
	int x = 1 % mod;
	while(b){
		if(b & 1) x = mul(x, a);
		a = mul(a, a);
		b >>= 1;
	}
	return x;
}
inline int inv(int a){ return powr(a, mod - 2);}

int main(){
	p2[0] = 1;
	for(int i = 1; i < N; i++) p2[i] = add(p2[i - 1], p2[i - 1]);
	int n, A, B; cin >> n >> A >> B;
	if(A > B) swap(A, B);
	for(int j = 0; j <= n; j++) dp[j][B] = dp2[j][B] = p2[j];
	for(int j = 1; j <= n; j++){
		for(int i = 0; i < B; i++){
			dp[j][i] = dp[j - 1][i + 1];
			// < A zeroes, then one
			dp[j][i] = add(dp[j][i], sub(
				j >= 2 ? prefdp[j - 2] : 0, j - A - 1 < 0 ? 0 : prefdp[j - A - 1]));
			// atleast A zeroes
			if(j >= A){
				dp[j][i] = add(dp[j][i], dp2[j - A][min(B, i + A)]);
			}
			dp2[j][i] = add(dp2[j - 1][i + 1], dp[j - 1][i + 1]);
			if(i == 1) prefdp[j] = add(prefdp[j - 1], dp[j][i]);
		}
	}
	cout << dp[n][0] << endl;
}