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>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (ll i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
#define equals(a, b) (fabs((a) - (b)) < EPS)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
const ll mod = 1000000007;
//const ll mod = 998244353;
const int inf = 1e9 + 10;
const ll INF = 1e18;
const ld EPS = 1e-10;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

ll modpow(ll a,ll n) {
  ll res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(25);

  ll n, a, b;
  cin >> n >> a >> b;

  ll ans = 0;
  if (a > b) swap(a, b);
  vector<vector<ll>> f(n + 1, vector<ll>(2, 0));
  if (b >= 2) {
    f[0][0] = 1;
    f[0][1] = 1;
    FOR(i, 1, n + 1) {
      rep(k, 2) {
        FOR(j, 1, i + 1) {
          if (k == 0 && j < a) continue;
          f[i][k] = (f[i][k] + f[i - j][k ^ 1]) % mod;
        }
      }
    }
    vector<ll> g(n + 1);
    g[0] = 1;
    FOR(i, 1, n + 1) g[i] = (f[i][0] + f[i][1]) % mod;
    //rep(i, n + 1) cout << g[i]<< '\n';
    vector<vector<ll>> dp(n, vector<ll>(2, 0));
    FOR(i, 1, n) {
      if (i < a) dp[i][0] = (dp[i][0] + 1) % mod;
      FOR(j, 1, min(i, a)) dp[i][0] = (dp[i][0] + dp[i - j][1]) % mod;
      if (i < b) dp[i][1] = (dp[i][1] + g[i - 1]) % mod;
      FOR(j, 1, min(i, b)) dp[i][1] = (dp[i][1] + dp[i - j][0] * g[max(0LL, j - 2)]) % mod;
      if (n - i < b) ans = (ans + dp[i][0] * g[n - i - 1]) % mod;
      if (n - i < a) ans = (ans + dp[i][1]) % mod;
    }
  }
  ans = (modpow(2, n) - ans + mod) % mod;
  cout << ans << '\n';


  




  
  return 0;
}