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 rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_range(i, s, e) for (int i = (s); i < (int)(e); i++)
#define rep_rev(i, s, e) for (int i = (s)-1; i >= (int)(e); i--)
#define sort_vec(v) sort((v).begin(),(v).end())
typedef int64_t lint;
// lint mod = 998244353;
lint mod = 1000000007;
template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

int app() {
  int n,a,b;
  cin>>n>>a>>b;

  if(a<b) swap(a,b);

  vector<vector<lint>>
  dp(n+1,vector<lint>(n+1,0)),
  // dp[la][lb]: 1がlbからkまで続き、長さb以上の1の連続を0にすると0がlaからkまで続く場合の数
  sumdpb(n+1,vector<lint>(n+1,0));  // sum(dp[la][0...lb])
  dp[0][0]=1;
  sumdpb[0][0]=1;
  rep_range(k,1,n+1){
    rep_range(la,max(0,k-a-b),k){
      dp[la][k]+=dp[la][k-1];  // ***0.0
      // ****.1 は変わらない
      dp[k-1][k]+=(k>=2?sumdpb[la][k-2]:0)-(k>=b+1?sumdpb[la][k-b-1]:0);  // ***1.0
      dp[la][k]+=(k>=b+1?sumdpb[la][k-b-1]:0);  // **11.0
      if(la<=k-a) dp[la][k]=0;
      else dp[la][k]%=mod;
      dp[k-1][k]%=mod;
      sumdpb[la][k]=(sumdpb[la][k-1]+dp[la][k])%mod;
    }
  }

  lint ans=0;
  rep(k,n+1){
    rep(la,n+1){
      if(k==n||n-k>=b){
        if(n-la<a) ans+=dp[la][k];
      }else{
        if(k-la<a) ans+=dp[la][k];
      }
      ans%=mod;
    }
  }

  lint all=1;
  rep(_,n) all=all*2%mod;
  return (all-ans+mod)%mod;
}

int main(){cout<<app()<<endl;return 0;}
