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
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// gp_hash_table<int, int> mapka;

using namespace std;
#define PB push_back
#define MP make_pair
#define LL long long
#define int LL
#define FOR(i,a,b) for(int i = (a); i <= (b); i++)
#define RE(i,n) FOR(i,1,n)
#define REP(i,n) FOR(i,0,(int)(n)-1)
#define R(i,n) REP(i,n)
#define VI vector<int>
#define PII pair<int,int>
#define LD long double
#define FI first
#define SE second
#define st FI
#define nd SE
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())

template<class C> void mini(C &a4, C b4) { a4 = min(a4, b4); }
template<class C> void maxi(C &a4, C b4) { a4 = max(a4, b4); }

template<class TH> void _dbg(const char *sdbg, TH h){ cerr<<sdbg<<'='<<h<<endl; }
template<class TH, class... TA> void _dbg(const char *sdbg, TH h, TA... a) {
  while(*sdbg!=',')cerr<<*sdbg++;
  cerr<<'='<<h<<','; _dbg(sdbg+1, a...);
}

template<class T> ostream &operator<<(ostream& os, vector<T> V) {
  os << "["; for (auto vv : V) os << vv << ","; return os << "]";
}
template<class L, class R> ostream &operator<<(ostream &os, pair<L,R> P) {
  return os << "(" << P.st << "," << P.nd << ")";
}

#ifdef LOCAL
#define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (__VA_ARGS__)
#define cerr if(0)cout
#endif

const int MAX = 5010;
const int P = 1e9 + 7;
void add(int &a,int b){
  a += b;
  if(a >= P) a-= P;
}
int mul(int a,int b){
  return a * b % P;
}
int n,a,b;
int p2[MAX];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  cerr << fixed << setprecision(6);
  cin >> n >> a >> b;
  p2[0] = 1;
  R(i,MAX-1){
    p2[i+1] = p2[i];
    add(p2[i+1], p2[i]);
  }
  if(a < b)swap(a, b);
  if(a == 1 || b == 1){
    cout << p2[n] << "\n";
    return 0;
  }
  vector<vector<int>> dpa(n+1,vector<int>(n+1));
  vector<vector<int>> dpb(n+1,vector<int>(n+1));
  dpa[0][0] = 1;
  int res = 0;
  for(int i = 0; i < n; i++){
    int sum = 0;
    for(int j = 0; j < a; j++){
      add(sum, dpa[i][j]);
      if(i + b <= n){
        if(j + b >= a){
          add(res, mul(p2[n-i-b], dpa[i][j]));
        }else{
          add(dpb[i + b][j + b], dpa[i][j]);
        }
      }
      if(j != a-1){
        add(dpa[i+1][j+1], dpa[i][j]);
        add(dpa[i+1][j+1], dpb[i][j]);
        add(dpb[i+1][j+1], dpb[i][j]);
      }else{
        int mn = 0;
        add(mn, dpa[i][j]);
        add(mn, dpb[i][j]);
        add(mn, dpb[i][j]);
        add(res, mul(mn, p2[n-i-1]));
      }
    }
    for(int j = 1; j < b; j++){
      if(i + j + 1 < n){
        add(dpa[i + j + 1][1], sum);
      }
    }
  }
  cout << res << "\n";
}
