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 mod 1000000007
using namespace std;
int M(int x) { return x >= mod ? x - mod : x; }
void Add(int &x, int y) { (x += y) >= mod ? x -= mod : x; }

int read() {
    int x = 0, f = 1;
    char c = getchar();
    while (c < '0' || c > '9') {
        if (c == '-') f = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        x = x * 10 + c - '0';
        c = getchar();
    }
    return x * f;
}
int n, A, B;
int f[5003][5003], g[5003][5003];
int pf[10004][5003], pg[10004][5003];

int S(int *p, int l, int r) { return M(p[r] - (l > 0 ? p[l - 1] : 0) + mod); }

int main() {
    // clock_t c = clock();
    // cerr << clock() - c << endl;
    n = read(), A = read(), B = read();
    if (A > B) swap(A, B);
    int res = 1;
    for (int i = 1; i <= n; ++i) res = M(res << 1);
    if (A == 1) return printf("%d\n", res), 0;

    for (int i = 1; i <= B; ++i)
        f[0][i] = pf[i + n][0] = g[0][i] = pg[i + n][0] = 1;

    for (int i = 1; i <= n; ++i) {
        int s = 0;
        for (int x = 1; x <= min(A - 1, i); ++x) Add(s, g[i - x][B]);
        for (int j = 1; j <= B; ++j) {
            f[i][j] = pf[j - i + n][i] = M(s + S(pg[j - i + n], i - j, i - A));
            g[i][j] = pg[j - i + n][i] = S(pf[j - i + n], i - j, i - 1);
        }

        for (int j = n - i + 1; j <= B + n - i - 1; ++j)
            Add(pf[j][i], pf[j][i - 1]), Add(pg[j][i], pg[j][i - 1]);
    }
    printf("%d\n", M(res + mod - M(g[n][B] + f[n][B])));
    // cerr << clock() - c << endl;
    return 0;
}