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 <cstdio>
#include <algorithm>
using namespace std;

const int MAXN = 5000;
const int MOD = int(1E9) + 7;

inline int add(int x, int y) {x += y; return x >= MOD ? x - MOD : x;}
inline int sub(int x, int y) {x -= y; return x < 0 ? x + MOD : x;}
inline int mul(int x, int y) {return 1LL * x * y % MOD;}

int pow_mod(int b, int p) {
	int ret = 1;
	for(int i=p;i;i>>=1,b=mul(b,b))
		if( i & 1 ) ret = mul(ret, b);
	return ret;
}

int f[MAXN + 5], g[2][MAXN + 5], N, A, B;
int main() {
	scanf("%d%d%d", &N, &A, &B);
	if( A < B ) swap(A, B);
	
	f[0] = 1;
	for(int i=1;i<A;i++) {
		f[i] = add(f[i - 1], i >= B);
		for(int j=B;i>j;j++)
			f[i] = add(f[i], f[i - j - 1]);
	}
	
	g[0][0] = g[1][0] = 1;
	for(int i=1;i<=N;i++) {
		for(int j=1;j<=i&&j<B;j++)
			g[0][i] = add(g[0][i], g[1][i - j]);
		
		if( i != 1 ) g[1][i] = add(g[1][i], g[0][i - 1]);
		for(int j=2;j<i&&j<A;j++)
			g[1][i] = add(g[1][i], mul(f[j - 2], g[0][i - j]));
		if( i < A ) g[1][i] = add(g[1][i], f[i - 1]);
	}
	
	int ans = sub(pow_mod(2, N), g[0][N]);
	for(int i=1;i<A;i++)
		ans = sub(ans, mul(f[i - 1], g[0][N - i]));
	printf("%d\n", ans);
}