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 rep(i, a, b) for (int i = (a); i <= int(b); i++)
#define per(i, a, b) for (int i = (a); i >= int(b); i--)
using namespace std;

typedef long long ll;
const int maxn = 5000, mod = 1e9 + 7;
int n, A, B, f[maxn + 5], g[maxn + 5], h[maxn + 5];

int qpow(int a, int b) {
	int c = 1;
	for (; b; b >>= 1, a = 1ll * a * a % mod) if (b & 1) c = 1ll * a * c % mod;
	return c;
}

inline int chk_mod(int x) { return x < mod ? x : x - mod; }
inline void mod_add(int &x, int y) { x += y, x < mod ? 0 : x -= mod; }
inline void mod_add(int &x, ll y) { x = (x + y) % mod; }

int F1(int x) { return f[x - 1]; }
int F2(int x) { return x == 1 ? 1 : f[x - 2]; }

int main() {
	scanf("%d %d %d", &n, &A, &B);
	if (A > B) swap(A, B);
	if (A == 1) printf("%d\n", qpow(2, n)), exit(0);
	f[0] = 1;
	rep(i, 1, B - 1) {
		f[i] = f[i - 1];
		if (i >= A) mod_add(f[i], 1);
		rep(j, A, i - 1) mod_add(f[i], f[i - j - 1]);
	}
	g[0] = h[0] = 1;
	rep(i, 1, n) {
		rep(j, 1, min(i, A - 1)) mod_add(g[i], h[i - j]);
		if (i < B) h[i] = F1(i);
		rep(j, 1, min(i - 1, B - 1)) mod_add(h[i], 1ll * g[i - j] * (i == n ? F1(j) : F2(j)));
	}
	int res = qpow(2, n);
	mod_add(res, mod - chk_mod(g[n] + h[n]));
	printf("%d\n", res);
	return 0;
}