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 int long long
const int MAX = 510000;
const int MOD = 1000000007;

int modpow(int a, int n, int mod) {
    int res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
     signed main(){
         cout << std::fixed << std::setprecision(15);
int n,a,b;
cin>>n>>a>>b;
if(a<b)swap(a,b);
int x[a+1];
x[0]=1;

for(int i=1;i<a+1;i++){
     x[i]=x[i-1];
     for(int j=0;j+b+1<=i;j++){
          x[i]=(x[i]+x[j])%MOD;
     }
}
int y[2][n+1];
y[1][0]=1;y[0][0]=1;
for(int i=1;i<n+1;i++){
     y[1][i]=0;y[0][i]=0;
     for(int j=i-1;j>=0&&i-j<b;j--){
          y[0][i]=(y[0][i]+y[1][j])%MOD;
     }
     if(i!=n){
     for(int j=i-1;j>=0&&i-j<a;j--){
        if(j!=0) y[1][i]=(y[1][i]+y[0][j]*x[i-j-1]%MOD)%MOD;
         else  y[1][i]=(y[1][i]+x[i-j]%MOD)%MOD;
     }
     }else{
          for(int j=i-1;j>=0&&i-j<a;j--){
        if(j!=0) y[1][i]=(y[1][i]+y[0][j]*x[i-j]%MOD)%MOD;
         else y[1][i]=(y[1][i]+x[i-j+1]%MOD)%MOD;
     }
     }
}

//for(int i=0;i<=n;i++)cerr<<y[0][i]<<' ';
//cerr<<endl;
////for(int i=0;i<=n;i++)cerr<<y[1][i]<<' ';
//cerr<<endl;
//for(int i=0;i<a-1;i++)cerr<<x[i]<<' ';
//cerr<<endl;
cout<<(modpow(2,n,MOD)+MOD-y[0][n]+MOD-y[1][n])%MOD<<endl;


     }

 


 






    





      

        
