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;
namespace Base{
	# define mr make_pair
	typedef long long ll;
	typedef double db;
	const int inf = 0x3f3f3f3f, INF = 0x7fffffff;
	const ll  infll = 0x3f3f3f3f3f3f3f3fll, INFll = 0x7fffffffffffffffll;
	template<typename T> void read(T &x){
    	x = 0; int fh = 1; double num = 1.0; char ch = getchar();
		while (!isdigit(ch)){ if (ch == '-') fh = -1; ch = getchar(); }
		while (isdigit(ch)){ x = x * 10 + ch - '0'; ch = getchar(); }
	    if (ch == '.'){
	    	ch = getchar();
	    	while (isdigit(ch)){num /= 10; x = x + num * (ch - '0'); ch = getchar();}
		}
		x = x * fh;
	}
	template<typename T> void chmax(T &x, T y){x = x < y ? y : x;}
	template<typename T> void chmin(T &x, T y){x = x > y ? y : x;}
}
using namespace Base;

const int P = 1e9 + 7, N = 5010;
int n, A, B, f[N][2], g[N], h[N];
int main(){
	read(n); read(A); read(B);
	if (A > B) swap(A, B);
	g[1] = 1;
	for (int i = 2; i <= B; i++){
		g[i] = g[i - 1];
		for (int j = A + 1; j <= i; j++)
			g[i] = (g[i] + g[i - j]) % P;
	}
	h[0] = 1;
	for (int i = 1; i <= B; i++){
		h[i] = h[i - 1];
		for (int j = A + 1; j <= i; j++)
			h[i] = (h[i] + h[i - j]) % P;
	}
	f[0][0] = f[0][1] = 1;
	for (int i = 1; i <= n; i++){
		if (i != n){
			for (int j = 1; j <= min(A - 1, i); j++)
				f[i][0] = (f[i][0] + f[i - j][1]) % P;
			for (int j = 1; j <= min(B - 1, i - 1); j++)
				f[i][1] = (f[i][1] + 1ll * f[i - j][0] * g[j]) % P;
			if (B > i) f[i][1] = (f[i][1] + 1ll * f[0][0] * h[i]) % P;
		}
		else {
			for (int j = 1; j <= min(A - 1, i); j++)
				f[i][0] = (f[i][0] + f[i - j][1]) % P;
			for (int j = 1; j <= min(B - 1, i); j++)
				f[i][1] = (f[i][1] + 1ll * f[i - j][0] * h[j]) % P;
		}
	}
	int ans = 1;
	for (int i = 1; i <= n; i++) ans = ans * 2 % P;
	ans = (ans - (f[n][0] + f[n][1]) % P + P) % P;
	cout << ans << endl;
    return 0;
}
