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
#ifndef BZ
#pragma GCC optimize "-O3"
#endif
#include <bits/stdc++.h>

#define ALL(v) (v).begin(), (v).end()
#define rep(i, l, r) for (int i = (l); i < (r); ++i)

using ll = long long;
using ld = long double;
using ull = unsigned long long;

using namespace std;

const ll MOD = 1e9 + 7;

ll pw(ll a, ll b) {
	ll ans = 1; while (b) {
		while (!(b & 1)) b >>= 1, a = (a * a) % MOD;
		ans = (ans * a) % MOD, --b;
	} return ans;
}

const int N = 5100;

int n, a, b;

ll dp[N][2];
ll dp2[N][2];

void add(ll& a, ll b) {
	a = (a + b) % MOD;
}

int main() {
	ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
	cout.setf(ios::fixed), cout.precision(20);
	cin >> n >> a >> b;
	if (a < b) {
		swap(a, b);
	}

	dp2[0][0] = 1;
	
	for (int i = 0; i < n; ++i) {
		add(dp2[i + 1][0], dp2[i][0]);
		add(dp2[i + 1][0], dp2[i][1]);
		add(dp2[i + 1][1], dp2[i][1]);
		if (i + b <= n) {
			add(dp2[i + b][1], dp2[i][0]);
		}
	}

	dp[0][0] = 1;
	dp[0][1] = 1;
	for (int i = 0; i < n; ++i) {
		for (int j = 1; j <= b - 1 && i + j <= n; ++j) {
			add(dp[i + j][1], dp[i][0]);
		}

		for (int j = 1; j < a && i + j <= n; ++j) {
			int len = j;
			if (i != 0) {
				len -= 1;
			}
			if (i + j != n) {
				len -= 1;
			}
			len = max(len, 0);

			add(dp[i + j][0], dp[i][1] * (dp2[len][0] + dp2[len][1]));
		}
	}

	ll sm = (dp[n][0] + dp[n][1]) % MOD;
	ll ans = pw(2, n) - sm;
	ans %= MOD;
	if (ans < 0) {
		ans += MOD;
	}
	cout << ans << "\n";

	return 0;
}


