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;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	int n,a,b;
	cin >> n >> a >> b;
	
	long long mod=1000000007;
	
	//a<=b
	if(a>b) swap(a,b);
	
	vector<vector<long long>> dp(n+1,vector<long long>(b));
	vector<vector<long long>> dp2(n+1,vector<long long>(b));
	vector<long long> res(n+1);
	dp[0][0]=1;
	dp2[0][0]=0;
	
	for(int i=0;i<n;i++){
		res[i+1]+=(res[i]*2)%mod;
		res[i+1]%=mod;
		
		//add 1
		for(int j=0;j<n;j++){
			if((j+1)<b){
				dp[i+1][j+1]+=dp[i][j];
				dp[i+1][j+1]+=dp2[i][j];
				dp[i+1][j+1]%=mod;
			}
		}
		res[i+1]+=dp[i][b-1];
		res[i+1]+=dp2[i][b-1]*2;
		res[i+1]%=mod;
		
		//add 0
		for(int j=0;j<n;j++){
			if((j+1)<b){
				dp2[i+1][j+1]+=dp2[i][j];
				dp2[i+1][j+1]%=mod;
			}
			if(j<b){
				dp[i+1][0]+=dp[i][j];
				dp[i+1][0]%=mod;
			}
		}
		if((i+1-a)>=0){
			for(int j=1;j<b;j++){
				dp[i+1][0]=(dp[i+1][0]+mod-dp[i+1-a][j])%mod;
			}
			if((i+1-a)==0) dp[i+1][0]=(dp[i+1][0]+mod-1)%mod;
		}
		
		for(int j=1;j<n;j++){
			if((i+a)>n) continue;
			if((j+a)<b){
				dp2[i+a][j+a]+=dp[i][j];
				dp2[i+a][j+a]%=mod;
			}else if(j<b){
				res[i+a]+=dp[i][j];
				res[i+a]%=mod;
			}
		}
		if(i==0){
			if(a<b){
				dp2[i+a][a]+=dp[i][0];
				dp2[i+a][a]%=mod;
			}else{
				res[i+a]+=dp[i][0];
				res[i+a]%=mod;
			}
		}
	}
	cout << res[n] << "\n";
	return 0;
}