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 long long long int
using namespace std;

// @author: pashka

int mod = 1000000007;

struct mint {
    int value;
    constexpr mint() : value() {}
    mint(const long &x) {
        value = normalize(x);
    }
    static long normalize(const long &x) {
        long v = x % mod;
        if (v < 0) v += mod;
        return v;
    }
    bool operator==(const mint &x) { return value == x.value; };
    mint operator+(const mint &x) { return value + x.value; };
    mint operator*(const mint &x) { return (long)value * x.value; };
    void operator+=(const mint &x) { value = normalize(value + x.value);};
    void operator-=(const mint &x) { value = normalize(value - x.value);};
};


int main() {
    ios::sync_with_stdio(false);

    int n, a, b;
    cin >> n >> a >> b;
    if (a < b) swap(a, b);
    vector<vector<mint>> d(n + 1, vector<mint>(n + 1));
    vector<vector<mint>> d2(n + 3, vector<mint>(n + 3));
    vector<vector<mint>> d3(n + 3, vector<mint>(n + 3));
    d[0][0] = 1;
    vector<mint> p2(n + 1);
    p2[0] = 1;
    for (int i = 0; i < n; i++) {
        p2[i + 1] = p2[i] * 2;
    }
    mint res = 0;
    for (int i = 0; i <= n; i++) {
        for (int j = 0; j <= n; j++) {
//            cout << i << " " << j << " " << d[i][j].value << "\n";
            d2[i + 1][j] += d2[i][j];
            d3[i + 1][j + 1] += d3[i][j];
            d[i][j] += d2[i][j];
            d[i][j] += d3[i][j];
            if (d[i][j] == 0) continue;
            if (j >= a) {
                res += d[i][j] * p2[n - i];
                continue;
            } else {
                if ((n - i) >= b && j + (n - i) >= a) {
                    res += d[i][j];
                }
            }
            if (i < n) {
                d[i + 1][j + 1] += d[i][j];
            }
            {
                int l = 1;
                int r = min(b, n - i);
                if (r > l) {
                    d2[i + l + 1][1] += d[i][j];
                    d2[i + r + 1][1] -= d[i][j];
                }
            }
            {
                int l = b;
                int r = n - i;
                if (r > l) {
                    d3[i + l + 1][j + l + 1] += d[i][j];
                    d3[i + r + 1][j + r + 1] -= d[i][j];
                }
            }
        }
    }
    cout << res.value << "\n";

    return 0;
}