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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;

#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__);fflush(stderr);
#else
	#define eprintf(...) 42
#endif

using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
	return (ull)rng() % B;
}

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second

clock_t startTime;
double getCurrentTime() {
	return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}


const ll MOD = (ll)1e9 + 7;
ll add(ll x, ll y) {
	x += y;
	if (x >= MOD) return x - MOD;
	return x;
}
ll sub(ll x, ll y) {
	x -= y;
	if (x < 0) return x + MOD;
	return x;
}
ll mult(ll x, ll y) {
	return (x * y) % MOD;
}
ll bin_pow(ll x, ll p) {
	if (p == 0) return 1;
	if (p & 1) return mult(x, bin_pow(x, p - 1));
	return bin_pow(mult(x, x), p / 2);
}
ll rev(ll x) {
	return bin_pow(x, MOD - 2);
}

const int N = 5005;
int p2[N];
int dp[N][N][2];
int a[2 * N];
int ans;
int n, A, B;

int main()
{
	startTime = clock();
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);

	p2[0] = 1;
	for (int i = 1; i < N; i++)
		p2[i] = add(p2[i - 1], p2[i - 1]);
	ans = 0;

	scanf("%d%d%d", &n, &A, &B);
	if (A > B) swap(A, B);
	if (A == 1) {
		printf("%d\n", p2[n]);
		return 0;
	}
	dp[0][0][1] = 1;
	for (int pref = 0; pref <= n; pref++) {
		if (pref > 0) a[pref] = add(a[pref], a[pref - 1]);
		dp[pref][1][1] = add(dp[pref][1][1], a[pref]);
		ans = add(ans, mult(p2[n - pref], add(dp[pref][B][0], dp[pref][B][1])));
		if (pref == n) break;
		for (int g = 0; g < B; g++) {
			dp[pref + 1][g + 1][0] = add(dp[pref + 1][g + 1][0], dp[pref][g][0]);
			dp[pref + 1][g + 1][1] = add(dp[pref + 1][g + 1][1], dp[pref][g][0]);
			if (pref + A <= n)
				dp[pref + A][min(B, g + A)][0] = add(dp[pref + A][min(B, g + A)][0], dp[pref][g][1]);
			dp[pref + 1][g + 1][1] = add(dp[pref + 1][g + 1][1], dp[pref][g][1]);
			a[pref + 2] = add(a[pref + 2], dp[pref][g][1]);
			if (pref + A + 1 <= n)
				a[pref + A + 1] = sub(a[pref + A + 1], dp[pref][g][1]);
		}
	}
	printf("%d\n", ans);

	return 0;
}
