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
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>

#define pb push_back
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()
#define mp make_pair

using namespace std;

typedef long long int64;
typedef vector<int> vi;
typedef pair<int, int> ii;

const int64 MODULO = (int64) 1e9 + 7;

class TaskC {
 public:
  void solveOne(istream &in, ostream &out) {
    int n, a, b;
    in >> n >> a >> b;
    if (a > b) {
      int t = a;
      a = b;
      b = t;
    }
    vector<vector<int64>> diagSum(n + 1, vector<int64>(b));
    vector<vector<int64>> d(n + 1, vector<int64>(b));
    vector<int64> dPrefSum(n + 1);
    d[0][0] = 1;
    dPrefSum[0] = 1;
    diagSum[0][0] = 1;
    int64 finish = 0;
    for (int i = 1; i <= n; ++i) {
      dPrefSum[i] = dPrefSum[i - 1];
      for (int j = 1; j < b; ++j) {
        d[i][j] = d[i - 1][j - 1];
        if (i >= a + 1 && j >= a + 1) {
          d[i][j] += diagSum[i - a - 1][j - a - 1];
          if (d[i][j] >= MODULO) d[i][j] -= MODULO;
        }
        if (j == 1 && i >= 2) {
          d[i][j] += dPrefSum[i - 2];
          if (d[i][j] >= MODULO) d[i][j] -= MODULO;
          if (i > a) {
            d[i][j] -= dPrefSum[i - a - 1];
            if (d[i][j] < 0) d[i][j] += MODULO;
          }
        }
        diagSum[i][j] = d[i][j] + diagSum[i - 1][j - 1];
        if (diagSum[i][j] >= MODULO) diagSum[i][j] -= MODULO;
        dPrefSum[i] += d[i][j];
        if (dPrefSum[i] >= MODULO) dPrefSum[i] -= MODULO;
        if (n - i < a || j + n - i < b) {
          finish += d[i][j];
          if (finish >= MODULO) finish -= MODULO;
        }
      }
    }
    int64 res = 1;
    for (int i = 0; i < n; ++i) res = res * 2 % MODULO;
    res = (res + MODULO - finish) % MODULO;
    out << res << "\n";
  }

  void solve(std::istream &in, std::ostream &out) {
    int nt = 1;
    for (int it = 0; it < nt; ++it) {
      solveOne(in, out);
    }
  }
};


int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  TaskC solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
