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 <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <fstream>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <assert.h>

using namespace std;

typedef long long ll;

const int MAXN = 5005;
const int MOD = 1000000007;

int n,A,B,ans;
int pw[MAXN];
int f[MAXN][MAXN];
int g[MAXN][MAXN];
int lazg[MAXN][MAXN];
int lazf[MAXN][MAXN];
int sumg[MAXN];
int sumf[MAXN];
int spec[MAXN];

int main()
{
	scanf("%d%d%d",&n,&A,&B);
	if (A > B)
		swap(A,B);
	pw[0] = 1;
	for (int i = 1;i <= n;i++)
		pw[i] = pw[i - 1] * 2 % MOD;
	f[0][0] = g[0][0] = 1;
	int all = 0;
	for (int i = 0;i <= n;i++)
		for (int j = 0;j <= i;j++)
		{
			if (i || j)
			{
				(sumf[j] += lazf[i][j]) %= MOD;
				f[i][j] = sumf[j];
			}
			if (f[i][j])
			{
				(spec[i + 1] += f[i][j]) %= MOD;
				(spec[min(n + 1,i + A)] -= f[i][j]) %= MOD;
			//	for (int k = i + 1;k < i + A;k++)
			//		(g[k][k] += f[i][j]) %= MOD;
				(lazg[min(i + A,n + 1)][j] += f[i][j]) %= MOD;
			//	for (int k = i + A;k <= n;k++)
			//		(g[k][j] += f[i][j]) %= MOD;
			}
			if (i || j)
			{
				if (i == j)
				{
					(all += spec[i]) %= MOD;
					g[i][j] = all;
				}
				(sumg[j] += lazg[i][j]) %= MOD;
				(g[i][j] += sumg[j]) %= MOD;
			}
			if (g[i][j])
			{
				if (j + B <= n)
					(ans += (ll)g[i][j] * pw[n - max(j + B,i) - (i < n ? max(j + B,i) == i : 0)] % MOD) %= MOD;
				(lazf[min(i + 1,min(j + B - 1,n) + 1)][j] += g[i][j]) %= MOD;
				(lazf[min(j + B - 1,n) + 1][j] -= g[i][j]) %= MOD;
			//	for (int k = i + 1;k <= min(j + B - 1,n);k++)
			//		(f[k][j] += g[i][j]) %= MOD;
			}
		}
	printf("%d\n",(ans + MOD) % MOD);
	return 0;
}