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;
using ll = long long;
const int maxn = 5100, mod = 1e9 + 7;
int n, w, b, B[maxn][maxn][2], W[maxn][maxn][2], dep[maxn][2];
void add(int &a, int b) {
	a += b;
	if(a >= mod) a -= mod;
}
int main() {
	cin.tie(0)->sync_with_stdio(0);
	cin >> n >> w >> b;
	if(b < w) swap(w, b);
	B[0][0][0] = 1;
	int ans = 0;
	for(int l = 0; l <= n; l++) {
		if(l) {
			add(dep[l][0], dep[l-1][0]);
			add(dep[l][1], dep[l-1][1]);
		}
		for(int h = 0; h <= l; h++) {
			for(int f = 0; f < 2; f++) {
				if(h == 0) add(W[l][h][f], dep[l][f]);
				
				//cout << "B " << l << " " << h << " " << f << " " << B[l][h][f] << '\n';
				//cout << "W " << l << " " << h << " " << f << " " << W[l][h][f] << '\n';
				
				add(B[l + 1][h + 1][f | (h + 1 >= b)], B[l][h][f]);
				add(B[l + 1][h + 1][f | (h + 1 >= b)], W[l][h][f]);
				
				if(h) add(W[l + 1][h + 1][f | (h + 1 >= b)], W[l][h][f]);
				//B->W
				if(l + w < maxn)
					add(W[l + w][h + w][f | (h + w >= b)], B[l][h][f]);
				if(B[l][h][f]) {
					add(dep[l + 1][f], B[l][h][f]);
					if(l + w < maxn)
						add(dep[l + w][f], mod - B[l][h][f]);
				}
				
				if(l == n && f) add(ans, B[l][h][f]), add(ans, W[l][h][f]);
			}
		}
	}
	cout << ans;
}
