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 mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef double ld;

template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }

const i64 P = 1000000000 + 7;

const int maxn = 5100;
i64 dp[maxn][2];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);
    cout << fixed;
#ifdef LOCAL_DEFINE
    freopen("input.txt", "rt", stdin);
#endif

    int n, a, b;
    cin >> n >> a >> b;
    i64 ans;
    i64 d2 = 1;
    forn(i, n) (d2 *= 2) %= P;
    if (a == b) {
        vi64 dp(n + 1);
        dp[0] = 1;
        for1(i, n) for1(j, a - 1) if (j <= i) (dp[i] += dp[i - j]) %= P;
        ans = d2 - 2 * dp[n];
        ans %= P;
        if (ans < 0) ans += P;
    } else {
        if (a > b) swap(a, b);
        vi64 sh(b + 1);
        sh[1] = 1;
        forn(i, b + 1) for1(j, b - i) {
            int l = a, r = j - 1;
            if (l <= r) (sh[i + j] += sh[i] * (r - l + 1)) %= P;
        }
        forn(i, b) (sh[i + 1] += sh[i]) %= P;
//        forn(i, b) cerr << sh[i] << ' ';
//        cerr << '\n';

        dp[0][0] = 1;
        forn(i, n + 2) {
//            forn(z, 2) cerr << dp[i][z] << ' ';
//            cerr << '\n';
            for1(j, a - 1) if (i + j <= n + 2) (dp[i + j][0] += dp[i][1]) %= P;
            for1(j, b) {
                if (j == b && i && i + j < n + 2) continue;
                if (i + j <= n + 2) (dp[i + j][1] += dp[i][0] * sh[j]) %= P;
            }
        }

        ans = d2;
        (ans -= dp[n + 2][1]) %= P;
        if (ans < 0) ans += P;
    }
    cout << ans << '\n';

#ifdef LOCAL_DEFINE
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
    return 0;
}
