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;

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

using ll = long long;
using ld = long double;
using D = double;
using uint = unsigned int;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

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

const int maxn = 5005;

const int MOD = 1000000007;

inline int sub(int a, int b)
{
	a -= b;
	if (a < 0) a += MOD;
	return a;
}

const int OK = 0;

inline int RUN(int last, int tlen)
{
	return 1 + (last * maxn + tlen);
}

int dp[maxn][2 * maxn + 100];
int n, A, B;

inline void upd(int &a, int b)
{
	a += b;
	if (a >= MOD) a -= MOD;
}

int main()
{
	scanf("%d%d%d", &n, &A, &B);
	A = min(A, n);
	if (A > B) swap(A, B);
	dp[0][RUN(1, 0)] = 1;
	for (int i = 0; i <= n; i++)
	{
		for (int last = 0; last < 2; last++)
		{
			for (int tlen = 0; tlen <= n; tlen++)
			{
				int curans = dp[i][RUN(last, tlen)];
				//cout << i << ' ' << last << ' ' << tlen << ' ' << curans << endl;
				if (tlen >= B)
				{
					upd(dp[i][OK], curans);
				} else
				{
					if (last == 0 && tlen == 0)
					{
						upd(dp[i + 1][RUN(0, 0)], curans);
						upd(dp[i + 1][RUN(1, 1)], curans);
					} else
					{
						upd(dp[i + 1][RUN(last, tlen + 1)], curans);
						if (last == 0) upd(dp[i + 1][RUN(1, tlen + 1)], curans);
						else
						{
							if (i + A <= n)
							{
								upd(dp[i + A][RUN(0, tlen + A)], curans);
								upd(dp[i + 1][RUN(0, 0)], curans);
								upd(dp[i + A][RUN(0, 0)], sub(MOD, curans));
							} else // does not fit anyway
							{
								upd(dp[i + 1][RUN(1, 0)], curans);
							}
						}
					}
				}
				//cout << dp[3][RUN(0, 2)] << endl;
			}
		}

		//cout << i << " OK " << dp[i][OK] << endl;

		upd(dp[i + 1][OK], dp[i][OK]);
		upd(dp[i + 1][OK], dp[i][OK]);
	}
	
	printf("%d\n", dp[n][OK]);
    return 0;
}
