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 CLASS_MODINT
#define CLASS_MODINT

#include <cstdint>

template <std::uint32_t mod>
class modint {
private:
	std::uint32_t n;
public:
	modint() : n(0) {};
	modint(std::int64_t n_) : n((n_ >= 0 ? n_ : mod - (-n_) % mod) % mod) {};
	static constexpr std::uint32_t get_mod() { return mod; }
	std::uint32_t get() const { return n; }
	bool operator==(const modint& m) const { return n == m.n; }
	bool operator!=(const modint& m) const { return n != m.n; }
	modint& operator+=(const modint& m) { n += m.n; n = (n < mod ? n : n - mod); return *this; }
	modint& operator-=(const modint& m) { n += mod - m.n; n = (n < mod ? n : n - mod); return *this; }
	modint& operator*=(const modint& m) { n = std::uint64_t(n) * m.n % mod; return *this; }
	modint operator+(const modint& m) const { return modint(*this) += m; }
	modint operator-(const modint& m) const { return modint(*this) -= m; }
	modint operator*(const modint& m) const { return modint(*this) *= m; }
	modint inv() const { return (*this).pow(mod - 2); }
	modint pow(std::uint64_t b) const {
		modint ans = 1, m = modint(*this);
		while (b) {
			if (b & 1) ans *= m;
			m *= m;
			b >>= 1;
		}
		return ans;
	}
};

#endif // CLASS_MODINT

#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
using mint = modint<1000000007>;
int main() {
	int N, A, B;
	cin >> N >> A >> B;
	if (A < B) swap(A, B);
	vector<vector<mint> > dp(N + 1, vector<mint>(2 * N + 1)); // (pos, cont)
	for (int i = 0; i <= N; ++i) {
		mint g = mint(2).pow(N - i);
		for (int j = A; j <= 2 * N; ++j) {
			dp[i][j] = g;
		}
	}
	vector<mint> sum_line1(N + 2);
	sum_line1[N] = dp[N][1];
	vector<vector<mint> > sum_line45(N + 2, vector<mint>(2 * N + 2));
	for (int i = N; i >= 0; --i) {
		for (int j = 2 * N; j >= A; --j) {
			sum_line45[i][j] = sum_line45[i + 1][j + 1] + dp[i][j];
		}
	}
	for (int i = N - 1; i >= 0; --i) {
		for (int j = 0; j < A; ++j) {
			// next = A
			dp[i][j] += dp[i + 1][j + 1];
			// next = BA, BBA, BBBA, ...
			if (min(N - i, B) >= 2) {
				dp[i][j] += sum_line1[i + 2] - sum_line1[i + min(N - i, B) + 1];
			}
			if (N - i >= B + 1) {
				dp[i][j] += sum_line45[i + (B + 1)][j + (B + 1)] - sum_line45[i + (N - i) + 1][j + (N - i) + 1];
			}
			// next = BBBBB...
			if (N - i >= B && j + N - i >= A) {
				dp[i][j] += 1;
			}
			sum_line45[i][j] = sum_line45[i + 1][j + 1] + dp[i][j];
		}
		sum_line1[i] = sum_line1[i + 1] + dp[i][1];
	}
	cout << dp[0][0].get() << endl;
	return 0;
}