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

#include <bits/stdc++.h>

using namespace std;

typedef long double ld;

#ifdef DEBUG
#define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#else
#define eprintf(...) ;
#endif

#define sz(x) ((int) (x).size())
#define TASK "text"

const int inf = (int) 1.01e9;
const long long infll = (long long) 1.01e18;
const ld eps = 1e-9;
const ld pi = acos((ld) -1);

#ifdef DEBUG
mt19937 mrand(300); 
#else
mt19937 mrand(chrono::steady_clock::now().time_since_epoch().count()); 
#endif

int rnd(int x) {
  return mrand() % x;
}

void precalc() {
}

const int mod = (int) 1e9 + 7;

int mul(int a, int b) {
  return (long long) a * b % mod;
}

void add(int &a, int b) {
  a += b;
  if (a >= mod) {
    a -= mod;
  }
}

const int maxn = 5005;
int n, a, b;

bool read() {
  if (scanf("%d%d%d", &n, &a, &b) < 3) {
    return false;
  }
  return true;
}

int dp[maxn][maxn][2];
int dp0[maxn][2];

void solve() {
  if (a < b) {
    swap(a, b);
  }
  memset(dp, 0, sizeof(dp));
  memset(dp0, 0, sizeof(dp0));
  add(dp[0][0][1], 1);
  add(dp[1][0][1], mod - 1);
  add(dp0[0][0], 1);
  add(dp0[1][0], mod - 1);
  add(dp0[0][1], 1);
  add(dp0[1][1], mod - 1);
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= i; j++) {
      for (int t = 0; t < 2; t++) {
        auto &cur = dp[i][j][t];
        if (i) {
          add(cur, dp[i - 1][j][t]);
        }
        //eprintf("%d %d %d: %d\n", i, j, t, cur);
        if (!cur || i >= n) {
          continue;
        }
        int l = i + 1, r = n;
        if (t) {
          l = min(r, i + b);
        }
        add(dp[l][j][!t], cur);
        add(dp[r][j][!t], mod - cur);
        if (t && i + b <= n) {
          if (j + a > n) {
            add(dp0[n][!t], cur);
            add(dp0[n + 1][!t], mod - cur);
          }
        }
        if (!t) {
          int l = i + 1, r = n + 1;
          int m = j + a;
          if (l < m) {
            add(dp0[l][!t], cur);
            add(dp0[min(r, m)][!t], mod - cur);
          }
        }
      }
    }
    for (int t = 0; t < 2; t++) {
      auto &cur = dp0[i][t];
      if (i) {
        add(cur, dp0[i - 1][t]);
      }
      //eprintf("%d %d: %d\n", i, t, cur);
      if (!cur || i >= n) {
        continue;
      }
      int l = i + 1, r = n + 1;
      if (t) {
        r = min(r, i + b);
      } else {
        r = min(r, i + a);
      }
      add(dp0[l][!t], cur);
      add(dp0[r][!t], mod - cur);
      if (!t) {
        int l = i + 1, r = n + 1;
        add(dp[l][i][!t], cur);
        add(dp[r][i][!t], mod - cur);
      }
    }
  }
  int res = 1;
  for (int i = 0; i < n; i++) {
    res = mul(res, 2);
  }
  add(res, mod - dp0[n][0]);
  add(res, mod - dp0[n][1]);
  printf("%d\n", res);
}

int main() {
  precalc();
#ifdef DEBUG
  assert(freopen(TASK ".in", "r", stdin));
  assert(freopen(TASK ".out", "w", stdout));
#endif
  while (read()) {
    solve();
#ifdef DEBUG
    eprintf("Time %.2f\n", (double) clock() / CLOCKS_PER_SEC);
#endif
  }
  return 0;
}
