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 <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <bitset>
#include <sstream>
#include <queue>

#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)

using namespace std;

typedef long long int64;
typedef long double ldb;

const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = acos(-1);

template <class T> T sqr (T x) {return x * x;}
template <class T> T abs (T x) {return x < 0 ? -x : x;}

const int P = 1000 * 1000 * 1000 + 7;

int Sum(int a, int b) {
    return (a + b) % P;
}

int Mult(int a, int b) {
    return (a * (long long) b) % P;
}

int Pow(int a, int n) {
    if (n == 0) {
        return 1;
    }

    int res = Pow(a, n / 2);
    res = Mult(res, res);
    if (n % 2 == 1) {
        res = Mult(res, a);
    }

    return res;
}

int main () {
    ios_base::sync_with_stdio(0);
//  freopen("_input.txt", "rt", stdin);
//  freopen("_output.txt", "wt", stdout);

    int n, a, b;
    cin >> n >> a >> b;

    if (a > b) {
        swap(a, b);
    }

    vector<vector<int>> d1(n + 1, vector<int>(b));
    vector<vector<int>> d0(n + 1, vector<int>(b));
    vector<int> total1(n + 1);

    d1[0][0] = 1;
    total1[0] = 1;
    for (int i = 1; i <= n; ++i) {
        d1[i][0] = 0;
        for (int j = 1; j < b; ++j) {
            d1[i][j] = Sum(d1[i - 1][j - 1], d0[i - 1][j - 1]);
        }
        
        d0[i][0] = 0;
        for (int j = 1; j < min(a, i + 1); ++j) {
            d0[i][0] = Sum(d0[i][0], total1[i - j]);
        }
        
        if (i >= a) {
            for (int j = a; j < b; ++j) {
                d0[i][j] = Sum(d1[i - a][j - a], d0[i - 1][j - 1]);
            }
        }

        total1[i] = 0;
        for (int j = 0; j < b; ++j) {
            total1[i] = Sum(total1[i], d1[i][j]);
        }
    }

    int res = 0;
    for (int i = 0; i < b; ++i) {
        res = Sum(res, Sum(d0[n][i], d1[n][i]));
    }

    cout << Sum(Pow(2, n), P - res) << "\n";

    return 0;
}
