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 <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second

const int mod = 1000000007;
const int mxn = 5002;
int n, x, y;
int dp2[mxn];
int dp[mxn][2];

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n >> x >> y;
	if(x > y) swap(x, y);
	
	int ret = 1;
	dp[0][0] = dp[0][1] = dp2[0] = dp2[1] = 1;
	for(int i = 1; i <= n; i++){
		dp2[i + 1] = (dp2[i] + (i >= x)) % mod;
		for(int j = x; j < i; j++) (dp2[i + 1] += dp2[i - j]) %= mod;
		
		for(int j = 1; j <= min(i, x - 1); j++){
			(dp[i][0] += dp[i - j][1]) %= mod;
		}
		for(int j = 1; j <= min(i, y - 1); j++){
			(dp[i][1] += (ll)dp2[1 + j - (i != n) - (j != i)] * dp[i - j][0] % mod) %= mod;
		}
		
		(ret *= 2) %= mod;
	}
	(ret += (mod - (dp[n][0] + dp[n][1]) % mod)) %= mod;
	
	cout << ret << endl;

	return 0;
}