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;
#ifndef ONLINE_JUDGE
#define dbg(x...) do{cout << "\033[32;1m" << #x << "->" ; err(x);} while(0)
void err(){cout << "\033[39;0m" << endl;}
template<template<typename...> class T,typename t,typename... A>
void err(T<t> a,A... x){for (auto v:a) cout << v << ' '; err(x...);}
template<typename T,typename... A>
void err(T a,A... x){cout << a << ' '; err(x...);}
#else
#define dbg(...)
#endif
typedef long long ll;
typedef pair<int,int> pi;
typedef vector<int> vi;
template<class T> using vc=vector<T>;
template<class T> using vvc=vc<vc<T>>;
template<class T> void mkuni(vector<T>&v)
{
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
}
template<class T>
void print(T x,int suc=1)
{
    cout<<x;
    if(suc==1) cout<<'\n';
    else cout<<' ';
}
template<class T>
void print(const vector<T>&v,int suc=1)
{
    for(int i=0;i<v.size();i++)
        print(v[i],i==(int)(v.size())-1?suc:2);
}
const int INF=0x3f3f3f3f;
const int maxn=5e3+7;
const int mod=1e9+7;
int f[maxn][2];
int dp[maxn][2];
int main()
{
	int n;
	cin>>n;
	int a,b;
	cin>>a>>b;
	if(a>b) swap(a,b);
	dp[0][0]=dp[0][1]=1;
	f[0][1]=1;
	for(int i=0;i<=b+1;i++)
	{
		for(int j=a;i+j<=b+1;j++)
			f[i+j][1]=(f[i+j][1]+f[i][0])%mod;
		for(int j=1;i+j<=b+1;j++)
			f[i+j][0]=(f[i+j][0]+f[i][1])%mod;
		//dbg(i,f[i][0],f[i][1]);
	}
	for(int i=0;i<n;i++)
	{
		for(int j=1;j<a&&i+j<=n;j++)
			dp[i+j][0]=(dp[i+j][0]+dp[i][1])%mod;
		for(int j=1;j<b&&i+j<=n;j++)
		{
			dp[i+j][1]=(dp[i+j][1]+(ll)dp[i][0]*f[j+(i==0)+(i+j==n)][0]%mod)%mod;
		}
	//	dbg(i,dp[i][0],dp[i][1]);
	}
	int tot=1;
	for(int i=1;i<=n;i++) tot=tot*2%mod;
	print((tot-(dp[n][0]+dp[n][1])%mod+mod)%mod);
}
