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>
typedef long long int ll;
typedef long double ld;
#define pb push_back
#define pii pair < int , int >
#define F first
#define S second
#define endl '\n'
#define int long long
#define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#define kill(x) return cout<<x<<'\n', 0;
using namespace std;
const int N=5e3+10,mod=1e9+7;
ll dp[N][N][2];
ll par[N][N][2];
ll pd[N];
int32_t main(){
    ll n,a,b;
    cin >> n >> a >> b;
    if (a>b) swap(a,b);
    ll ans=1;
    for (int i=1;i<=n;i++){
        ans*=2;
        ans%=mod;
    }
    dp[0][0][0]=1;
    dp[0][0][1]=1;
    par[0][0][1]=1;
    par[0][0][0]=1;
    pd[0]=1;
    /// par[i][j] ehtelaf i ta andis j
    for (int i=1;i<=n;i++){
        for (int j=1;j<min(i+1,b);j++){
            for (int p=0;p<=1;p++){
                if (p==0){
                    if (j<a) continue;
                    dp[i][j][0]=par[i-j][i-a][1];
                }
                else{
                    dp[i][j][1]=par[i-j][i-1][0];
                }
                dp[i][j][p]%=mod;
             //   cout << i << " " << j << " " << p << " " << dp[i][j][p] << endl;;
            }
        }
        for (int j=i-1;j>max((ll)-1,i-a);j--){
            dp[i][0][0]+=pd[j];
            dp[i][0][0]%=mod;
        }
        for (int j=1;j<b;j++){
            pd[i]+=dp[i][j][1];
            pd[i]%=mod;
        }
        for (int j=0;j<min(i+1,b);j++){
            par[i-j][i][0]=par[i-j][i-1][0]+dp[i][j][0];
            par[i-j][i][1]=par[i-j][i-1][1]+dp[i][j][1];
            par[i-j][i][0]%=mod;
            par[i-j][i][1]%=mod;
        }
    }
    for (int i=0;i<b;i++){
        ans-=dp[n][i][0]+dp[n][i][1];
        ans+=mod*2;
        ans%=mod;
    }
    cout << ans << endl;
}
