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<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
#include<cassert>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
//問題文および制約はちゃんと確認しよう！
//サイズは10^5じゃなくて2×10^5とかかもしれないし、重要な制約・条件を見落としているかも
//とりあえずサンプルを読んでから解法を考えよう？
lint mo=1000000007;
lint zyo[5010];
lint dp[5010][5010][3];
int main()
{
	zyo[0]=1;
	rep(i,5005) zyo[i+1]=(zyo[i]*2)%mo;
	memset(dp,0,sizeof(dp));
	int n,a,b;cin>>n>>a>>b;
	if(a<b) swap(a,b);
	if(b==1){
		cout<<zyo[n]<<endl;return 0;
	}
	dp[1][1][0]=1;
	dp[1][1][1]=1;
	dp[b][b][2]=1;
	lint out=0;
	rep(i,n+1) rep(j,i+1){
		rep(k,3) dp[i][j][k]%=mo;
		if(j>=a){
			rep(k,3){
				out+=dp[i][j][k]*zyo[n-i];
				out%=mo;
			}
			continue;
		}
		if(i>=n) continue;
		
		dp[i+1][1][1]+=dp[i][j][0];
		if(j<b-1){
			dp[i+1][j+1][0]+=dp[i][j][0];
		}
		
		dp[i+1][j+1][1]+=dp[i][j][1];
		dp[i+1][1][0]+=dp[i][j][1];
		if(i+b<=n) dp[i+b][j+b][2]+=dp[i][j][1];
		
		dp[i+1][j+1][1]+=dp[i][j][2];
		dp[i+1][j+1][2]+=dp[i][j][2];
	}
	cout<<out<<endl;
}
