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 <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}

void add(ll &a,ll b){
  a=(a+b)%MOD;
}

void mul(ll &a,ll b){
  a%=MOD;b%=MOD;
  a=a*b%MOD;
}

ll dp[5005][5005][2][2];

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int N,A,B;
  cin>>N>>A>>B;

  if(A>B) swap(A,B);

  dp[0][0][1][0]=1;
  for(int i=0;i<N;i++) for(int j=0;j<B;j++){
    rep(k,2) rep(m,2){
      if(dp[i][j][k][m]==0) continue;

      ll pre=dp[i][j][k][m];
      if(k==1&&i+A<=N){
        if(j+A<B) add(dp[i+A][j+A][0][1],pre);
        add(dp[i+A][0][0][0],MOD-pre);
      }

      for(int ne=0;ne<2;ne++){
        int nj=j,nk=ne,nm=m;
        if(ne==1||(m==1&&ne==0)) nj=j+1;
        if(ne==0&&m==0) nj=0;
        if(ne==1&&m==1) nm=0;
        add(dp[i+1][nj][nk][nm],pre);
      }
    }
  }

  ll ans=1;
  rep(k,N) mul(ans,2);
  rep(j,B) rep(k,2) rep(m,2) add(ans,MOD-dp[N][j][k][m]);
  cout<<ans<<endl;

  return 0;
}
