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
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#endif
//#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
typedef long long ll;
const int maxN = 5005;
const int mod = (int)1e9 + 7;
int mult(int a, int b) {
    return (1LL * a * b) % mod;
}
int sum(int a, int b) {
    int s = a + b;
    if (s >= mod) s -= mod;
    return s;
}
int sub(int a, int b) {
    int s = a - b;
    if (s < 0) s += mod;
    return s;
}
int n, a, b;
int dp[maxN][2][2];
int pw2[maxN];
int ans[maxN][2];
int real_dp[maxN];
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
//    freopen("input.txt", "r", stdin);
    cin >> n >> a >> b;
    if (a < b) swap(a, b);
    for (int i = 1; i < a; i++) {
        for (int x = 0; x < 2; x++) {
            for (int y = 0; y < 2; y++) {
                if (x == y) {
                    if (x == 0) {
                        dp[i][x][y] = 1;
                    }
                    if (x == 1 && i >= b) {
                        dp[i][x][y] = 1;
                    }
                }
                if (y == 1) {
                    for (int z = b; z < i; z++) {
                        dp[i][x][y] = sum(dp[i][x][y], dp[i - z][x][y ^ 1]);
                    }
                }
                else {
                    for (int z = 1; z < i; z++) {
                        dp[i][x][y] = sum(dp[i][x][y], dp[i - z][x][y ^ 1]);
                    }
                }
            }
        }
    }
    for (int i = 1; i <= n; i++) {
        real_dp[i] = dp[i][0][0];
    }
    pw2[0] = 1;
    for (int i = 1; i <= n; i++) pw2[i] = mult(2, pw2[i - 1]);
    for (int len = 1; len <= n; len++) {
        for (int en = 0; en < 2; en++) {
            if (en == 1) {
                if (len < b) {
                    ans[len][1] = 1;
                }
            }
            else {
                ans[len][0] = sum(real_dp[len], dp[len][1][0]);
            }
            for (int sz = 1; sz < len; sz++) {
                if (en == 1) {
                    if (sz < b) {
                        ans[len][1] = sum(ans[len][1], ans[len - sz][0]);
                    }
                }
                else {
                    ans[len][0] = sum(ans[len][0], mult(real_dp[sz], ans[len - sz][1]));
                }
            }
        }
    }
    for (int i = 1; i <= n; i++) {
        ans[n][1] = sum(ans[n][1], mult(ans[i][1], dp[n - i][0][1]));
    }
    cout << sub(pw2[n], sum(ans[n][0], ans[n][1]));
    return 0;
}