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;

const int64_t MOD = 1e9+7;
void add(int64_t& a, int64_t b){
    a = (a+b) % MOD;
}
void mul(int64_t& a, int64_t b){
    a = a*b % MOD;
}

int64_t power_mod(int64_t num, int64_t power){
    int64_t prod = 1;
    num %= MOD;
    while(power > 0){
        if(power&1) prod = prod * num % MOD;
        num = num * num % MOD;
        power >>= 1;
    }
    return prod;
}

int64_t extgcd(int64_t a, int64_t b, int64_t& x, int64_t& y){
    int64_t d = a;
    if(b != 0){
        d = extgcd(b, a%b, y, x);
        y -= (a/b) * x;
    }else{
        x = 1; y = 0;
    }
    return d;
}

int64_t inv_mod(int64_t a){
    int64_t x, y;
    extgcd(a, MOD, x, y);
    return (MOD + x%MOD) % MOD;
}

vector<int64_t> fact, fact_inv;

void create_mod_tables(int num){
    fact.assign(num+1, 1);
    fact_inv.assign(num+1, 1);
    for(int i=1; i<=num; i++) fact[i] = fact[i-1] * i % MOD;
    fact_inv[num] = inv_mod(fact[num]);
    for(int i=num; i>0; i--) fact_inv[i-1] = fact_inv[i] * i % MOD;
}

int64_t comb_mod(int n, int k){
    return fact[n] * fact_inv[n-k] % MOD * fact_inv[k] % MOD;
}

int64_t perm_mod(int n, int k){
    return fact[n] * fact_inv[n-k] % MOD;
}

int main(){
    int N, A, B;
    cin >> N >> A >> B;
    if(A > B) swap(A, B);

    // i番目まで、Bがj個、最後がどっちか、フィーバーかどうか
    static int64_t dp[5001][5001][2][2];
    dp[0][0][1][0] = 1;

    for(int i=0; i<N; i++) for(int j=0; j<B; j++) for(int l=0; l<2; l++) for(int f=0; f<2; f++){
        if(i+A <= N && l && !f){
            if(j+A < B) add(dp[i+A][j+A][0][1], dp[i][j][l][f]);
            add(dp[i+A][0][0][0], MOD - dp[i][j][l][f]);
        }
        for(int n=0; n<2; n++){
            int j2 = (n||f ? j+1 : 0);
            int l2 = n;
            int f2 = f && !n;
            if(j2 < B) add(dp[i+1][j2][l2][f2], dp[i][j][l][f]);
        }
    }

    int64_t ans = power_mod(2, N);
    for(int j=0; j<B; j++) for(int l=0; l<2; l++) for(int f=0; f<2; f++) add(ans, MOD - dp[N][j][l][f]);
    cout << ans << endl;
    return 0;
}
