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
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <chrono>
#include <random>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <iomanip>
#define dibs reserve
#define OVER9000 1234567890
#define tisic 47
#define soclose 1e-8
#define patkan 9
#define ff first
#define ss second
using uint = unsigned int;
using cat = long long;
using dbl = long double;
constexpr dbl pi = 3.14159265358979323846;
using namespace std;

#ifdef DONLINE_JUDGE
	// palindromic tree is better than splay tree!
	#define lld I64d
#endif

template <typename T>
T abs(T x) {return (x < 0) ? -x : x;}

cat pw(cat a, cat e, cat mod) {
	if(e <= 0) return 1;
	cat x = pw(a, e/2, mod);
	x = x * x % mod;
	return (e&1) ? x * a % mod : x;
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cout << fixed << setprecision(10);
	cat mod = 1000000007;
	int N, A, B;
	cin >> N >> A >> B;
	if(A > B) swap(A, B);
	if(A == 1) {
		cat ans = 1;
		for(int i = 0; i < N; i++) ans = 2 * ans % mod;
		cout << ans << "\n";
		return 0;
	}
	vector<cat> cnt_segB(B, 0);
	cnt_segB[1] = 1;
	for(int i = 2; i < B; i++) {
		cnt_segB[i] = cnt_segB[i-1];
		for(int j = A; j <= i-2; j++) cnt_segB[i] += cnt_segB[i-1-j];
		cnt_segB[i] %= mod;
	}
	vector<cat> cnt_segB_bor(B, 0);
	cnt_segB_bor[0] = 1;
	for(int i = 1; i < B; i++) {
		cnt_segB_bor[i] = cnt_segB_bor[i-1];
		for(int j = A; j <= i-1; j++) cnt_segB_bor[i] += cnt_segB_bor[i-1-j];
		cnt_segB_bor[i] %= mod;
	}
	vector<cat> dp_segA(N+1, 0), dp_segB(N+1, 0);
	dp_segB[0] = dp_segA[0] = 1;
	for(int i = 1; i <= N; i++) {
		for(int j = 1; j <= min(i, A-1); j++) dp_segA[i] += dp_segB[i-j];
		dp_segA[i] %= mod;
		cat mod2 = mod * mod * 4;
		for(int j = 1; j <= min(i-1, B-1); j++) {
			dp_segB[i] += dp_segA[i-j] * cnt_segB[j];
			if(dp_segB[i] >= mod2) dp_segB[i] -= mod2;
		}
		if(i < B) dp_segB[i] += cnt_segB_bor[i];
		dp_segB[i] %= mod;
	}
	cat ans = 1;
	for(int i = 0; i < N; i++) ans = 2 * ans % mod;
	ans -= dp_segA[N] + dp_segB[N];
	for(int i = 1; i < B; i++) ans -= dp_segA[N-i] * (cnt_segB_bor[i] - cnt_segB[i]) % mod;
	ans %= mod;
	if(ans < 0) ans += mod;
	cout << ans << "\n";
}

// look at my code
// my code is amazing
