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 <bits/stdc++.h>
 
#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < n; i++)
#define forr(i,a,b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb(x) push_back(x)
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;

const int MX = 5005, mod = 1000000007;
int n, a, b, mem[MX][MX][2], mem2[MX][MX];

ll pot (ll b, int p) {
	ll res = 1;
	while (p) {
		if (p & 1) (res *= b) %= mod;
		(b *= b) %= mod;
		p /= 2;
	}
	return res;
}

void sum (int &a, int b) {
	a += b;
	if (a >= mod) a -= mod;
}

int dp (int i, int j, int f);

int dp2 (int i, int j) {
	if (i < 0) return 0;

	int &res = mem2[i][j];
	if (res != -1) return res;
	res = 0;

	sum(res, dp(i, j, 1));
	sum(res, dp2(i - 1, j + 1));

	return res;
}

int dp (int i, int j, int f) {
	if (f == 0 && j >= a) return 0;
	if (f == 1 && j >= b) return 0;
	if (!i) return 1;

	int &res = mem[i][j][f];
	if (res != -1) return res;
	res = 0;

	sum(res, dp(i - 1, j + 1, f));
	sum(res, dp(i - 1, 1, f ^ 1));

	if (i == n || (j && f)) {
		sum(res, dp2(i - a - 1, j + a + 1));

		if (j && f && i >= a)
			sum(res, dp(0, j + i, f));
	}

	return res;
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);
	memset(mem, -1, sizeof(mem));
	memset(mem2, -1, sizeof(mem2));

	cin >> n >> a >> b;
	if (a > b) swap(a, b);
	cout << MOD(pot(2, n) - dp(n, 0, 0), mod) << endl;

	return 0;
}
