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>
using namespace std;
#define maxn 5010
#define ll long long
#define db double
#define vi vector<int>
#define pb push_back
#define mod 1000000007
#define fi first
#define pi pair<int, int>
#define se second
#define mp make_pair
ll ksm(ll a, ll b) {
   if (!b) return 1;
   ll ns = ksm(a, b >> 1);
   ns = ns * ns % mod;
   if (b & 1) ns = ns * a % mod;
   return ns;
}
// head
int n, a, b;
ll dp[maxn][maxn]; // 
ll pw[maxn];
ll s[maxn * 2][maxn]; // 第二维固定的和 
ll tt[maxn * 2];
int main() {
	ios::sync_with_stdio(false);
	cin >> n >> a >> b;
	if (a > b) swap(a, b);
	pw[0] = 1;
	for (int i = 1; i < maxn; i++)
		pw[i] = pw[i - 1] * 2 % mod;
	for (int i = n + 1; i >= 0; i--) {
		//当前1的位置
		for (int j = 1; j <= i + 1; j++) {
			int nl = i - j + 1;
			if (i == n + 1) nl--;
			if (nl >= b) dp[i][j] = pw[max(0, n - i)];
			else {
				dp[i][j] = (s[i + a + 1][j] + dp[i + 1][j]);
				dp[i][j] += tt[i + 2] - tt[i + a + 1];
				dp[i][j] %= mod;
				if (dp[i][j] < 0) dp[i][j] += mod;
			}
			s[i][j] = (s[i + 1][j] + dp[i][j]) % mod;
			if (i == j) 
				tt[i] = (tt[i + 1] + dp[i][i]) % mod; 
		}
	} 
	cout << dp[0][1] << endl;
	return 0;
}
