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 <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#include <list>
#define popcount __builtin_popcount
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll MOD=1e9+7;
ll powmod(ll a, ll k){
    ll ap=a, ans=1;
    while(k){
        if(k&1){
            ans*=ap;
            ans%=MOD;
        }
        ap=ap*ap;
        ap%=MOD;
        k>>=1;
    }
    return ans;
}
ll inv(ll a){
    return powmod(a, MOD-2);
}
ll f[200020], invf[200020];
void fac(int n){
    f[0]=1;
    for(ll i=1; i<=n; i++) f[i]=f[i-1]*i%MOD;
    invf[n]=inv(f[n]);
    for(ll i=n-1; i>=0; i--) invf[i]=invf[i+1]*(i+1)%MOD;
}
ll comb(int x, int y){
    if(!(0<=y && y<=x)) return 0;
    return f[x]*invf[y]%MOD*invf[x-y]%MOD;
}
ll dp[2][5050];
ll dp2[2][5050];
ll c[5050];
int main()
{
    int n, a, b;
    cin>>n>>a>>b;
    if(a>b) swap(a, b);
    fac(n+1);
    dp2[0][0]=1;
    for(int i=1; i<=n+2; i++){
        for(int j=a; j<=i; j++){
            if(i-j>=0){
                (dp2[0][i]+=dp2[1][i-j])%=MOD;
            }
        }
        for(int j=1; j<=i; j++){
            if(i-j>=0){
                (dp2[1][i]+=dp2[0][i-j])%=MOD;
            }
        }
    }
    dp[0][0]=1;
    for(int i=1; i<=n+2; i++){
        for(int j=1; j<a; j++){
            if(i-j>=0){
                (dp[0][i]+=dp[1][i-j])%=MOD;
            }
        }
        for(int j=1; j<=b; j++){
            if(i-j>=0){
                if(j==b){
                    if(i-j!=0 && i!=n+2) continue;
                }
                (dp[1][i]+=dp[0][i-j]*dp2[1][j])%=MOD;
            }
        }
    }
    cout<<(powmod(2, n)-dp[1][n+2]+MOD)%MOD<<endl;
    return 0;
}