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>

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;++A)
#define pii pair<int,int>
#define pll pair<ll,ll>

using namespace std;

/////////////////////////////////////////////////////
#define MOD (ll)(1e9+7)

ll moddiv(ll a,ll b){
    a %= MOD;
    b %= MOD;
    for(ll m=MOD-2;m>0;m/=2){
        if(m&1){
            a=a*b%MOD;
        }
        b=b*b%MOD;
    }
    return a;
}

ll N,A,B;
ll Fa[5454], iFa[5454];
ll mk[5050],dpa[5050],dpb[5050];
ll i, j, k;

void init(){
    ll i;
    Fa[0] = 1;
    fornum(i,0,5050){
        Fa[i + 1] = Fa[i] * (i + 1) % MOD;
    }
    iFa[5050] = moddiv(1, Fa[5050]);
    for (i = 5050; i > 0;--i){
        iFa[i - 1] = iFa[i] * i % MOD;
    }
}
ll C(ll a,ll b){
    if(a<b)
        return 0;
    return Fa[a] * iFa[a - b] % MOD * iFa[b] % MOD;
}
ll inv(ll a){
    return iFa[a - 1] * Fa[a] % MOD;
}

int main(){
    scanf("%lld%lld%lld", &N,&A,&B);
    if(A<B)
        swap(A, B);
    mk[0] = 1;
    fornum(i,1,A+1){
        mk[i] = mk[i-1];
        fornum(j,1,i){
            if(B+1<=i-j){
            //printf("%lld ", j);
                (mk[i] += mk[j]) %= MOD;
            }
        }
        //printf("%lld,%lld\n",i, mk[i]);
    }

    ll ans = 1;
    dpa[0] = 1;
    dpb[0] = 1;
    fornum(i,0,N){
        ans = ans * 2 % MOD;
        fornum(j,i+1,N+1){
            if (j - i < A){
                if(i==0||j==N)
                    (dpa[j] += dpb[i] * mk[j - i + 1]) %= MOD;
                else
                    (dpa[j] += dpb[i] * mk[j - i]) %= MOD;
            }
            if (j - i < B)
                (dpb[j] += dpa[i]) %= MOD;
        }
        //printf("%lld:%lld,%lld\n", i, dpa[i], dpb[i]);
    }
    //printf("%lld,%lld\n", dpa[N], dpb[N]);
    (ans += -dpa[N] - dpb[N] + MOD * 2) %= MOD;
    printf("%lld\n", ans);


    return 0;
}