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 pair<int, int> pii;
#ifdef DEBUG
#define display(x) cerr << #x << " = " << (x) << endl;
#define displaya(a, st, n)\
	{cerr << #a << " = {";\
	for(int qwq = (st); qwq <= (n); ++qwq) {\
		if(qwq == (st)) cerr << ((a)[qwq]);\
		else cerr << ", " << ((a)[qwq]);\
	} cerr << "}" << endl;}
#define displayv(v) displaya(v, 0, (int)(v).size() - 1)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define display(x) ;
#define displaya(a, st, n) ;
#define displayv(v) ;
#define eprintf(...) if(0) fprintf(stderr, "...")
#endif
template<typename T> bool chmin(T &a, const T &b) { return a > b ? a = b, true : false; }
template<typename T> bool chmax(T &a, const T &b) { return a < b ? a = b, true : false; }
template<typename A, typename B>
ostream& operator << (ostream& out, const pair<A, B> &p) {
	return out << '(' << p.first << ", " << p.second << ')';
}

const LL P = 1000000007;
const int maxN = 5000 + 5;
int n, A, B;
LL f[maxN][2], f2[maxN][2], g[maxN], g2[maxN], h[maxN][2][2], p2[maxN];

#define bin(a) for(int a = 0; a < 2; ++a)

int main() {
	cin >> n >> A >> B;
	p2[0] = 1;
	for(int i = 1; i <= n; ++i) p2[i] = p2[i - 1] * 2 % P;
	
	if(A > B) swap(A, B);
	if(A == 1) {
		cout << p2[n] << endl;
		return 0;
	}
	
	memset(h, 0, sizeof(h));
	for(int i = A; i <= B; ++i) h[i][0][0]++;
	for(int i = 1; i <= B; ++i) h[i][1][1]++;
	for(int i = 1; i < B; ++i) {
		for(int j = 1; i + j <= B; ++j)
			bin(a) (h[i + j][a][1] += h[i][a][0]) %= P;
		bin(a) (h[i + A][a][0] += h[i][a][1]) %= P;
		for(int j = A + 1; i + j <= B; ++j)
			bin(a) (h[i + j][a][0] += h[i][a][1]) %= P;
	}
//	for(int i = 1; i <= n; ++i)
//		eprintf("%lld %lld %lld %lld\n", h[i][0][0], h[i][0][1], h[i][1][0], h[i][1][1]);
	for(int i = 1; i < B; ++i) memset(h[i], 0, sizeof(h[i]));
	
	memset(f, 0, sizeof(f));
	memset(g, 0, sizeof(g));
	memset(g2, 0, sizeof(g2));
	memset(f2, 0, sizeof(f2));
	
	for(int i = 1; i <= n; ++i) bin(a) bin(b)
		(f[i][b] += h[i][a][b]) %= P;
	for(int i = 1; i < A; ++i) g2[i]++;
	for(int i = 1; i <= n; ++i) {
		bin(a) (f2[i][a] += f[i][a]) %= P;
		for(int j = 1; i + j <= n; ++j)
			bin(a) bin(b) (f2[i + j][b] += f[i][a] * p2[j - 1]) %= P;
		g[i] = (P + p2[i - 1] - f2[i][1]) % P;
		for(int j = 1; j < A && i + j <= n; ++j) (g2[i + j] += g[i]) %= P;
		
		for(int j = 1; i + j <= n; ++j) bin(b)
			(f[i + j][b] += g2[i] * h[j][1][b]) %= P;
	}
//	displaya(g, 1, n);
//	displaya(g2, 1, n);
	cout << ((f2[n][0] + f2[n][1]) % P) << endl;
	return 0;
}

