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 llong long long
#define mkpr make_pair
#define x first
#define y second
#define iter iterator
#define riter reverse_iterator
#define y1 Lorem_ipsum_
#define tm dolor_sit_amet_
using namespace std;

inline int read()
{
	int x = 0,f = 1; char ch = getchar();
	for(;!isdigit(ch);ch=getchar()) {if(ch=='-') f = -1;}
	for(; isdigit(ch);ch=getchar()) {x = x*10+ch-48;}
	return x*f;
}

const int mxN = 5000;
const llong P = 1e9+7;
llong f[mxN+3][2],g[mxN+3][2],h[mxN+3][2];
int n,A,B;

void updsum(llong &x,llong y) {x+=y-P,x+=(x>>31)&P;}

int main()
{
	n = read(),A = read(),B = read(); if(A>B) {swap(A,B);}
	g[0][0] = 1ll;
	for(int i=1; i<=n; i++)
	{
		for(int j=A; j<=i; j++)
		{
			updsum(g[i][0],g[i-j][1]);
		}
		for(int j=1; j<=i; j++)
		{
			updsum(g[i][1],g[i-j][0]);
		}
	}
	for(int i=1; i<=n; i++)
	{
		if(i<A) {f[i][0] = 1ll;}
		if(i<B) {f[i][1] = (g[i][0]+g[i][1])%P;}
		for(int j=1; j<i&&j<B; j++)
		{
			updsum(f[i][1],f[i-j][0]*g[j][1]%P);
		}
		for(int j=1; j<i&&j<A; j++)
		{
			updsum(f[i][0],f[i-j][1]);
		}
	}
	llong tot = 1ll,ans = f[n][0];
	for(int i=1; i<=n; i++) {tot = tot*2ll%P;}
	for(int i=1; i<B; i++)
	{
		updsum(ans,f[n-i][0]*(g[i][0]+g[i][1])%P);
	}
	printf("%lld\n",(tot-ans+P)%P);
	return 0;
}