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;

typedef long long ll;

const int mod = 1000000007;
const int Maxn = 5005;

int res;
int pw2[Maxn];
int n, a, b;
int ind[Maxn];
int delt[Maxn][Maxn];

void Add(int &res, int x) { res = (res + x) % mod; }

void Sub(int &res, int x) { res = (res - x + mod) % mod; }

int main()
{
    pw2[0] = 1;
    for (int i = 1; i < Maxn; i++)
        pw2[i] = 2ll * pw2[i - 1] % mod;
    scanf("%d %d %d", &n, &a, &b);
    if (a > b) swap(a, b);
    Add(delt[0][1], 1);
    Sub(delt[0][2], 1);
    for (int i = 0; i <= n; i++) {
        for (int j = i + 1; j <= n + 1; j++) {
            int cur = 0;
            if (j > 0) Add(delt[i][j], delt[i][j - 1]);
            Add(cur, delt[i][j]);
            if (j == i + 2) {
                if (i > 0) Add(ind[i], ind[i - 1]);
                Add(cur, ind[i]);
            }
            if (j - 1 - i >= b) { Add(res, ll(cur) * pw2[n + 1 - j] % mod); continue; }
            Add(delt[i][j + 1], cur);
            Sub(delt[i][j + 2], cur);
            int lim = min(a, n + 1 - j);
            Add(ind[j], cur);
            Sub(ind[j + lim - 1], cur);
            if (j + a <= n + 1) {
                if (j - 1 - i + a >= b) {
                    Add(delt[i][j + a], cur);
                    Sub(delt[i][j + a + 1], cur);
                } else {
                    Add(delt[i][j + a + 1], cur);
                    Add(delt[i][n + 1], cur);
                }
            }
        }
    }
    printf("%d\n", res);
    return 0;
}
