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 <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#define llint long long
#define inf 1e18
#define rep(x, s, t) for(llint (x) = (s); (x) < (t); (x)++)
#define Rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define mod 1000000007

using namespace std;
typedef pair<llint, llint> P;

llint n, a, b;
llint dp[5005][5005][2];
llint dp2[5005][2];
llint num[5005];

llint modpow(llint a, llint n)
{
	if(n == 0) return 1;
	if(n % 2){
		return ((a%mod) * (modpow(a, n-1)%mod)) % mod;
	}
	else{
		return modpow((a*a)%mod, n/2) % mod;
	}
}

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n >> a >> b;
	if(a > b) swap(a, b);
	
	dp[0][0][0] = 1;
	for(int i = 0; i < n; i++){
		for(int j = 0; j <= n; j++){
			for(int k = 0; k < 2; k++){
				for(int l = 0; l < 2; l++){
					llint nj = j+1;
					if(k != l) nj = 1;
					if(k == 1 && l == 0 && j < a) continue;
					if(k == 0 && nj >= b) continue;
					dp[i+1][nj][l] += dp[i][j][k], dp[i+1][nj][l] %= mod;
				}
			}
		}
	}
	
	for(int i = 0; i <= n; i++){
		for(int j = 0; j <= n; j++){
			for(int k = 0; k < 2; k++){
				if(k == 1 && j < a) continue;
				num[i] += dp[i][j][k], num[i] %= mod;
			}
		}
	}
	
	dp2[0][0] = dp2[0][1] = 1;
	for(int i = 0; i < n; i++){
		for(int j = 0; j < 2; j++){
			if(j == 1){
				for(int k = 1; k < a; k++){
					if(i+k > n) break;
					dp2[i+k][1-j] += dp2[i][j];
					dp2[i+k][1-j] %= mod;
				}
			}
			else{
				for(int k = 1; k < b; k++){
					if(i+k > n) break;
					llint len = k;
					if(i+k < n) len--;
					if(i > 0) len--;
					len = max(len, 0LL);
					
					dp2[i+k][1-j] += dp2[i][j] * num[len] % mod;
					dp2[i+k][1-j] %= mod;
				}
			}
		}
	}
	llint ans = dp2[n][0] + dp2[n][1]; ans %= mod;
	ans = modpow(2, n) - ans + mod, ans %= mod;
	cout << ans << endl;
	
	
	return 0;
}