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
N,A,B=map(int,input().split())
mod=10**9+7

A,B=min(A,B),max(A,B)

data=[0]*B
data[0]=1
for i in range(1,B):
    data[i]=(data[i-1]+sum(data[i-1-k] for k in range(A,i)))%mod

#print(data)

dp=[0]*(N+1)
dp[0]=1
imos=[0]*(N+1)
imos[0]=1

for i in range(1,N+1):
    if i!=N:
        for j in range(1,min(i,B)):
            #dp[i]+=sum(dp[i-j-k]*data[j-1] for k in range(1,min(A,i-j+1)))
            R=i-j-1
            L=i-j-min(A,i-j+1)
            if R>L:
                if L>-1:
                    dp[i]+=(imos[R]-imos[L])*data[j-1]
                else:
                    dp[i]+=imos[R]*data[j-1]
                dp[i]%=mod
        if B>i:
            dp[i]+=data[i]
            dp[i]%=mod
    else:
        for j in range(B):
            #dp[i]+=sum(dp[i-j-k]*data[j] for k in range(1,min(A,i-j+1)))
            R=i-j-1
            L=i-j-min(A,i-j+1)
            if R>L:
                if L>-1:
                    dp[i]+=(imos[R]-imos[L])*data[j]
                else:
                    dp[i]+=imos[R]*data[j]
                dp[i]%=mod
        #print(dp[i])
        #dp[i]+=sum(dp[i-k] for k in range(1,A))
    imos[i]=dp[i]
    imos[i]+=imos[i-1]
    imos[i]%=mod


#print(dp)
print((pow(2,N,mod)-dp[N])%mod)