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;
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcountll
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC

const int N = 5007, MOD = 1000 * 1000 * 1000 + 7;

int mod(int n) {
    n %= MOD;
    if (n < 0) return n + MOD;
    else return n;
}   
int fp(int a, int p) {
    int ans = 1, c = a;
    for (int i = 0; (1ll << i) <= p; ++i) {
        if ((p >> i) & 1) ans = mod(ans * c);
        c = mod(c * c);
    }   
    return ans;
}   
int dv(int a, int b) { return mod(a * fp(b, MOD - 2)); }
void add(int &a, int b) { a = mod(a + b); }

int dp[N][N][2], t1[N][N][2], t2[N][N][2];
signed main() {
    #ifdef HOME
    freopen("input.txt", "r", stdin);
    #else
    #define endl '\n'
    ios_base::sync_with_stdio(0); cin.tie(0);
    #endif

    int n, a, b;
    cin >> n >> a >> b;

    if (b < a)
        swap(a, b);

    for (int i = 1; i <= n; ++i) {
        for (int t = 0; t < 2; ++t) {
            int to = i;
            if (t == 0 && i < a)
                to = 0;
            dp[i][to][t] = 1;
        }   
    }   
    for (int i = 1; i <= n; ++i) {
        for (int j = 0; j < b; ++j) {
            for (int t = 0; t < 2; ++t) {

                add(t1[i][j][t], t1[i - 1][j][t]);
                add(dp[i][j][t], t1[i][j][t]);
                if (i && j) {
                    add(t2[i][j][t], t2[i - 1][j - 1][t]);
                }
                add(dp[i][j][t], t2[i][j][t]);
                int x = dp[i][j][t];

                if (t) {
                    if (1 < a) {
                        add(t1[i + 1][0][t^1], x);
                        if (i + a <= n) {
                            add(t1[i + a][0][t^1], -x);
                        }
                    }
                    if (a < b - j) {
                        if (i + a <= n && j + a <= n) {
                            add(t2[i + a][j + a][t^1], x);
                        }
                        if (i + b - j <= n && j + b - j <= n) {
                            add(t2[i + b - j][j + b - j][t^1], -x);                            
                        }   
                    }   
                }   
                else {
                    if (1 < b - j) {
                        add(t2[i + 1][j + 1][t^1], x);
                        if (i + b - j <= n && j + b - j <= n) {
                            add(t2[i + b - j][j + b - j][t^1], -x);                            
                        }   
                    }
                    /*
                    for (int k = 1; k < b - j; ++k)
                        add(dp[i + k][j + k][t^1], x);                        
                    */
                }   
            }   
        }   
    }   

    int ans = 1;
    for (int i = 0; i < n; ++i) 
        ans = (ans << 1) % MOD;
    for (int i = 0; i < b; ++i)
        for (int t = 0; t < 2; ++t)
            ans = mod(ans - dp[n][i][t]);
    cout << ans << endl;            
}