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 <iostream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvvl vector<vvl>
#define vvl vector<vector<ll>>
#define VV(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

#define P 1000000007

struct segtree{
  ll M=1, INIT;
  vector<ll> dat;
  segtree(ll N, ll num){
    INIT = num;
    while(M<N) M*=2;
    for(int i=0;i<M*2-1;i++)  dat.push_back(num);
  }
  void add(ll x, ll k, ll l=0, int r=-1){
    if(r==-1) r = M;
    k+=M-1;
    dat[k] = (dat[k] + x)%P;
    while(k>0) k = (k-1)/2, dat[k] = (dat[k*2+1] + dat[k*2+2])%P;
  }
  void update(ll x, ll k, ll l=0, int r=-1){
    if(r==-1) r = M;
    k+=M-1;
    dat[k] = x;
    while(k>0) k = (k-1)/2, dat[k] = (dat[k*2+1] + dat[k*2+2])%P;
  }

  ll query(ll a, ll b=-1, ll k=0, ll l=0, ll r=-1){
    if(r==-1) r = M;
    if(b==-1) b = M;
    if(r<=a || b<=l) return INIT;
    if(a<=l && r<=b) return dat[k];
    ll A = query(a, b, k*2+1, l, (l+r)/2);
    ll B = query(a, b, k*2+2, (l+r)/2, r);
    return (A + B)%P;
  }
};

int main(int argc, char const *argv[]) {
  vll t(5001, 1);
  for(int i=1;i<=5000;i++) t[i] = (t[i-1]*2)%P;
  ll n, a, b;std::cin >> n >> a >> b;
  if(a<b) swap(a, b);
  ll ans = 0;

  vvl dp = VV(n+1, n+1, 0, ll);
  dp[0][0] = 1;
  vvl accum = VV(n+1, n+1, 0, ll);
  accum[0][0] = 1;
  segtree seg(n+1, 0);
  vll ad(n+1, 0);
  seg.add(1, 0);
  // dp[i][j] = dp[i-b][j-b] + dp[i-b-1][j-b-1] .....
  for(int i=1;i<=n;i++){
    for(int j=0;j<=i;j++){
      // 11111111...0 (ok)
      if(j>b) dp[i][j] = accum[i-b-1][j-b-1];
      if(i==n && j>=b) dp[i][j] = (dp[i][j] + accum[i-b][j-b])%P;

      // 11..0 (error)
      ll m = max((ll)0, i-b);
      if(j==1){
        ll q = seg.query(m, i-1);
        dp[i][j] = (dp[i][j] + q)%P;
      }
      //0
      if(j>0) dp[i][j] = (dp[i][j] + dp[i-1][j-1])%P;
    }
    // okなものは答えに参入して削除
    for(int j=a;j<=n;j++) {
      ans = (ans + (t[n-i]*dp[i][j])%P)%P;
      dp[i][j] = 0;
    }

    for(int j=0;j<=n;j++) seg.add(ad[j], j), ad[j] = 0;
    for(int j=0;j<=i;j++) ad[i] = (ad[i] + dp[i][j])%P;

    //accum
    for(int j=0;j<=n;j++){
      accum[i][j] = ((j==0?0:accum[i-1][j-1]) + dp[i][j])%P;
    }
  }
  std::cout << ans << '\n';
  return 0;
}
