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 LL long long
#define ULL unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<LL,LL>
#define x first
#define y second
#define pi acosl(-1)
#define sqr(x) ((x)*(x))
#define pdd pair<double,double>
#define MEMS(x) memset(x,-1,sizeof(x))
#define MEM(x) memset(x,0,sizeof(x))
#define EPS 1e-4
#define arg ARG
#define cpdd const pdd
#define rank Rank
#define MAXN 205
//#define N 262144
#define ULL unsigned long long
#define ll long long
int dp[5005][5005][3];
int mod=1e9+7;
LL f_pow(LL a,LL b){
    LL res=1,temp=a;
    while(b){
        if(b&1)res=res*temp%mod;
        temp=temp*temp%mod;
        b>>=1;
    }
    return res;
}
int main(){
    int n,a,b;
    scanf("%d %d %d",&n,&a,&b);
    if(a>b)swap(a,b);
    if(a==1){
        printf("%lld\n",f_pow(2,n));
        return 0;
    }
    dp[1][1][1]=1;
    dp[1][1][0]=1;
    dp[0][0][1]=1;
   // dp2[0][0]=1;
   // dp2[1][1]=2;
    LL ans=0;
    for(int i = 2;i<=n;i++){
        for(int j=2;j<=i;j++){
           // if(j<=b){
                dp[i][j][1]+=(dp[i-1][j-1][1]+dp[i-1][j-1][2])%mod;
                dp[i][j][1]%=mod;
                dp[i][j][2]+=dp[i-1][j-1][2];
                dp[i][j][2]%=mod;
                if(j>=a){
                    dp[i][j][2]+=dp[i-a][j-a][1];
                    dp[i][j][2]%=mod;
                }
           // }
            if(j<a){
                dp[i][j][0]+=dp[i-1][j-1][0];
                dp[i][j][0]%=mod;
            }
        }
        for(int j=1;j<a;j++){
            dp[i][1][1]+=dp[i-1][j][0];
            dp[i][1][1]%=mod;
        }
        for(int j=1;j<b;j++){
            dp[i][1][0]+=dp[i-1][j][1];
            dp[i][1][0]%=mod;
        }
      /*  for(int j = 1;j<=i;j++){
            printf("%d %d %d %d %d\n",i,j,dp[i][j][0],dp[i][j][1],dp[i][j][2]);
        }*/
        ans+=(dp[i][b][1]+dp[i][b][2])*1ll*f_pow(2,n-i)%mod;
        if(i>=b)
        for(int j = b-a+1;j<b;j++){
            ans+=(dp[i-a][j][1])*1ll*f_pow(2,n-i)%mod;
        }
        ans%=mod;
    }
    printf("%d\n",ans);
}
/*
1000000000000000000
1000000000000000000 1 1 1 1000000000
*/
