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 <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cctype>

#include <algorithm>
#include <random>
#include <bitset>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <vector>
#include <chrono>
#include <iostream>
#include <limits>
#include <numeric>

#define LOG(FMT...) fprintf(stderr, FMT)

#define fir first
#define sec second

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;

// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

template<class T>
istream &operator>>(istream &is, vector<T> &v) {
  for (T &x : v)
    is >> x;
  return is;
}

ostream &operator<<(ostream &os, const pair<char, int> &unit) {
  return os << unit.first << "^" << unit.second;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  if (!v.empty()) {
    os << v.front();
    for (int i = 1; i < v.size(); ++i)
      os << ' ' << v[i];
  }
  return os;
}

const int N = 5010, P = 1000000007;

int f[N][N], g[N][N], pw[N];
int rsum[N];

int norm(int x) { return x >= P ? x - P : x; }

void add(int &x, int y) {
  if ((x += y) >= P)
    x -= P;
}

void sub(int &x, int y) {
  if ((x -= y) < 0)
    x += P;
}

int main() {
#ifdef ELEGIA
  freopen("test.in", "r", stdin);
  int nol_cl = clock();
#endif
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int n, a, b;
  cin >> n >> a >> b;
  pw[0] = 1;
  for (int i = 1; i <= n; ++i) pw[i] = norm(pw[i - 1] << 1);
  if (a < b) swap(a, b);
  f[0][a] = 1;
  for (int i = 0; i <= n; ++i) {
    if (i)
      add(rsum[i], rsum[i - 1]);
    add(f[i][a - 1], rsum[i]);
    if (i)
      for (int j = 0; j <= a; ++j) {
        add(g[i][j], g[i - 1][j + 1]);
        add(f[i][j], g[i][j]);
      }
    for (int j = 1; j <= a; ++j) {
      if (!f[i][j]) continue;
      add(f[i + 1][j - 1], f[i][j]);

      add(rsum[i + 2], f[i][j]);
      if (i + b + 1 <= n)
        sub(rsum[i + b + 1], f[i][j]);

      if (j > b) {
        if (i + j <= n)
          add(f[i + j][0], f[i][j]);
      } else {
        if (i + b <= n)
          add(f[i + b][0], f[i][j]);
      }
      if (i + b + 1 <= n && j - b - 1 >= 0) {
        add(g[i + b + 1][j - b - 1], f[i][j]);
      }

    }
  }
  int ans = 0;
  for (int i = 0; i <= n; ++i) {
    ans = (ans + f[i][0] * (ll) pw[n - i]) % P;
  }
  cout << ans << '\n';

#ifdef ELEGIA
  LOG("Time: %dms\n", int ((clock()
          -nol_cl) / (double)CLOCKS_PER_SEC * 1000));
#endif
  return 0;
}
