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;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=1000000007,MAX=5005,INF=1<<30;

ll dp[MAX][MAX];

ll rui(ll a,ll b){
    ll ans=1;
    while(b>0){
        if(b&1) ans=ans*a%mod;
        a=a*a%mod;
        b/=2;
    }
    return ans;
}

ll sum[MAX];
ll naname[MAX][MAX];

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int N,A,B;cin>>N>>A>>B;
    if(A>B) swap(A,B);
    if(A==1){
        cout<<rui(2,N)<<endl;
        return 0;
    }
    dp[0][0]=1;
    sum[0]=1;
    naname[0][0]=1;
    
    for(int i=1;i<=N;i++){
        for(int j=0;j<B;j++){
            if(j) dp[i][j]+=dp[i-1][j-1];
            
            if(j==1){
                //dp[i][j]+=(mod+sum[max(0,i-2)]-sum[max(0,i-A)]);
                //dp[i][j]%=mod;
                
                if(i-2>=0) dp[i][j]+=sum[i-2];
                if(i-(A+1)>=0) dp[i][j]+=mod-sum[i-(A+1)];
                dp[i][j]%=mod;
                /*for(int k=2;k<=A;k++){
                    for(int l=0;l<=B-1;l++){
                        if(i-k>=0) dp[i][j]+=dp[i-k][l];
                        dp[i][j]%=mod;
                    }
                }*/
            }
            
            if(i-(A+1)>=0&&j-(A+1)>=0) dp[i][j]+=naname[i-(A+1)][j-(A+1)];
            dp[i][j]%=mod;
            //dp[i][j]+=mod-naname[max(0,i-(A+1))][max(0,j-(A+1))]-naname[max(0,i-N)][max(0,j-N)];
            //dp[i][j]%=mod;
            
            /*for(int k=A+1;k<=N;k++){
                if(i-k>=0&&j-k>=0) dp[i][j]+=dp[i-k][j-k];
                dp[i][j]%=mod;
            }*/
        }
        
        ll S=0;
        for(int l=0;l<=B-1;l++){
            S+=dp[i][l];
            //S%=mod;
            if(S>=mod) S-=mod;
        }
        sum[i]=sum[i-1]+S;
        //sum[i]%=mod;
        if(sum[i]>=mod) sum[i]-=mod;
        
        naname[i][0]=dp[i][0];
        for(int j=1;j<=N;j++){
            naname[i][j]=naname[i-1][j-1]+dp[i][j];
            //naname[i][j]%=mod;
            if(naname[i][j]>=mod) naname[i][j]-=mod;
        }
    }
    
    ll ans=0;
    
    for(int i=1;i<N;i++){
        for(int j=1;j<B;j++){
            if(N-i<A||j+N-i<B){
                ans+=dp[i][j];
                //ans%=mod;
                if(ans>=mod) ans-=mod;
            }
        }
    }
    
    for(int j=0;j<B;j++){
        ans+=dp[N][j];
        ans%=mod;
    }
    
    cout<<(mod+rui(2,N)-ans)%mod<<endl;
}
