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
/********************************************************************************
	
	Code by a weak man who named CYJian, and he hopes the code can get more points.

	Algorithm: 

 ********************************************************************************/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

//{{{ FAST IO AND SOME FUNCTIONS
const int __SIZE = 1 << 18;
char ibuf[__SIZE], *iS, *iT;

#define ge (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, __SIZE, stdin), (iS == iT ? EOF : *iS++)) : *iS++)
#define ri read_int()
#define rl read_ll()
#define FILE(s) freopen(s"in", "r", stdin), freopen(s"out", "w", stdout)

template<typename T>
inline void read(T &x) {
	char ch, t = 0; x = 0;
	while(!isdigit(ch = ge)) t |= ch == '-';
	while(isdigit(ch)) x = x * 10 + (ch ^ 48), ch = ge;
	x = t ? -x : x;
}
inline int read_int() { int x; return read(x), x; }
inline ll read_ll() { ll x; return read(x), x; }

template<typename T> inline void chkmin(T&a, T b) { a = a < b ? a : b; }
template<typename T> inline void chkmax(T&a, T b) { a = a > b ? a : b; }
//}}}

const int mod = 1e9 + 7;

inline int Mod(int x) { return x >= mod ? x - mod : x; }
inline void Add(int &x, int y) { x += y, x -= x >= mod ? mod : 0; }

int f[5010];
int g[5010];
int P[5010];
int M[5010];
int F[2][5010];

int main() {
#ifdef LOCAL
	FILE("");
#endif

	int n = ri, A = ri, B = ri, res = 1;
	for(int i = 1; i <= n; i++) res = Mod(res << 1);
	if(A == 1 || B == 1) return printf("%d\n", res), 0;
	if(A > B) swap(A, B);
	f[0] = 1, g[0] = 1;
	for(int i = A; i < B; i++) {
		f[i] = Mod(f[i - 1] + g[i - 1]);
		for(int j = A; j <= i; j++)
			Add(g[i], f[i - j]);
	}

	for(int i = 1; i < B; i++)
		for(int j = 1; j <= i; j++)
			P[i] = (P[i] + 1LL * g[i - j] * (i == j ? 1 : j)) % mod;
	for(int i = 1; i < B; i++)
		for(int j = 1; j <= i; j++)
			M[i] = (M[i] + 1LL * g[i - j] * (i == j ? 1 : j - 1)) % mod;

	F[0][0] = F[1][0] = 1;
	for(int i = 1; i <= n; i++) {
		for(int j = 1; j < B; j++) {
			if(i == j || i == n) {
				F[1][i] = (F[1][i] + 1LL * F[0][i - j] * P[j]) % mod;
				if(i == j) break;
			} else F[1][i] = (F[1][i] + 1LL * F[0][i - j] * M[j]) % mod;
		}
		for(int j = 1; j < A; j++) {
			Add(F[0][i], F[1][i - j]);
			if(i == j) break;
		}
	}

	cout << Mod(res + mod - Mod(F[0][n] + F[1][n])) << endl;
	return 0;
}