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>
using namespace std;

#define ll long long

void exgcd(int a, int b, int& x, int& y) {
  if (!b) {
    x = 1, y = 0;
  } else {
    exgcd(b, a % b, y, x);
    y -= (a / b) * x;
  }
}

int inv(int a, int n) {
  int x, y;
  exgcd(a, n, x, y);
  return (x < 0) ? (x + n) : (x);
}

const int Mod = 1e9 + 7;

template <const int Mod = :: Mod>
class Z {
  public:
    int v;

    Z() : v(0) {	}
    Z(int x) : v(x){	}
    Z(ll x) : v(x % Mod) {	}

    friend Z operator + (const Z& a, const Z& b) {
      int x;
      return Z(((x = a.v + b.v) >= Mod) ? (x - Mod) : (x));
    }
    friend Z operator - (const Z& a, const Z& b) {
      int x;
      return Z(((x = a.v - b.v) < 0) ? (x + Mod) : (x));
    }
    friend Z operator * (const Z& a, const Z& b) {
      return Z(a.v * 1ll * b.v);
    }
    friend Z operator ~(const Z& a) {
      return inv(a.v, Mod);
    }
    friend Z operator - (const Z& a) {
      return Z(0) - a;
    }
    Z& operator += (Z b) {
      return *this = *this + b;
    }
    Z& operator -= (Z b) {
      return *this = *this - b;
    }
    Z& operator *= (Z b) {
      return *this = *this * b;
    }
};

Z<> qpow(Z<> a, int p) {
  Z<> rt = Z<>(1), pa = a;
  for ( ; p; p >>= 1, pa = pa * pa) {
    if (p & 1) {
      rt = rt * pa;
    }
  }
  return rt;
}

typedef Z<> Zi;

const int N = 5005;

int n, A, B;
Zi f[N], g[N][2];

int main() {
  scanf("%d%d%d", &n, &A, &B);
  if (A > B) {
    swap(A, B);
  }
  f[0] = 1;
  for (int i = 1; i <= B; i++) {
    f[i] = f[i - 1];
    for (int j = A; j <= i; j++) {
      if (j == i) {
        f[i] += 1;
      } else {
        f[i] += f[i - j - 1];
      }
    }
  }
  g[0][0] = 1;
  for (int i = 1; i < B; i++) {
    g[i][0] = f[i - 1]; 
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j < B && j <= i; j++) {
      g[i][0] += g[i - j][1] * ((j == 1) ? 1 : f[j - 2]);
    }
    for (int j = 1; j < A && j <= i; j++) {
      g[i][1] += g[i - j][0];
    }
  }
  Zi ans = g[n][1];
  for (int i = 1; i < B; i++) {
    ans += g[n - i][1] * f[i - 1];
  }
  ans = qpow(2, n) - ans;
  printf("%d\n", ans.v);
  return 0;
}
