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 <stdio.h>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>

using ll = long long int;
const int INF = (1<<30);
const ll INFLL = (1ll<<60);
const ll MOD = (ll)(1e9+7);

#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	a = (a<MOD)?a:(a-MOD);
	b = (b<MOD)?b:(b-MOD);
	a += b;
	a = (a<MOD)?a:(a-MOD);
}

ll sp1[5050][5050],sp[5050],dp[5050][5050][2];

int main(void){
	int n,a,b,i,j,k;
	ll ans = 0ll, tmp;
	std::cin >> n >> a >> b;
	/*
	if(a==b){
		dp[0][0][0] = 1ll;
		ans = 1ll;
		for(i=0; i<n; ++i){
			mul_mod(ans,2ll);
			for(j=0; j<a; ++j){
				for(k=0; k<2; ++k){
					add_mod(dp[i+1][j+1][k],dp[i][j][k]);
					add_mod(dp[i+1][1][k^1],dp[i][j][k]);
				}
			}
		}
		for(i=0; i<a; ++i){
			add_mod(ans,MOD-dp[n][i][0]);
			add_mod(ans,MOD-dp[n][i][1]);
		}
		std::cout << ans << std::endl;
	}
	*/
	if(a>b){
		std::swap(a,b);
	}
	// std::fill(dp[0][0],dp[5050][0],0ll);
	n += 2;
	sp[1] = 1ll;
	for(i=1; i<n; ++i){
		for(j=0; j<n; ++j){
			add_mod(sp1[i+1][j+1],sp1[i][j]);
		}
		for(j=a; j<n; ++j){
			add_mod(sp[i+1],sp1[i][j]);
		}
		add_mod(sp[i+1],sp[i]);
		add_mod(sp1[i+1][1],sp[i]);
	}
	for(i=1; i<=n; ++i){
		add_mod(dp[i][0][i>b],sp[i]);
	}
	for(i=0; i<n; ++i){
		for(k=0; k<2; ++k){
			tmp = 0ll;
			for(j=0; j<a; ++j){
				add_mod(dp[i+1][j+1][k],dp[i][j][k]);
				if(j){
					add_mod(tmp,dp[i][j][k]);
				}
			}
			for(j=1; i+j<n; ++j){
				add_mod(dp[i+j][0][k||j>=b],tmp*sp[j]%MOD);
			}
			add_mod(dp[n][0][k||n-i>b],tmp*sp[n-i]%MOD);
		}
	}
	std::cout << dp[n][0][1] << std::endl;
	return 0;
}
