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>
#define mo 1000000007
#define eps 1e-8
using namespace std;
long long read(){
    long long xx=0,flagg=1;
    char ch=getchar();
    while((ch<'0'||ch>'9')&&ch!='-')
        ch=getchar();
    if(ch=='-'){
        flagg=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        xx=xx*10+ch-'0';
        ch=getchar();
    }
    return xx*flagg;
}
void pus(long long xx,long long flagg){
    if(xx<0){
        putchar('-');
        xx=-xx;
    }
    if(xx>=10)
        pus(xx/10,0);
    putchar(xx%10+'0');
    if(flagg==1)
        putchar(' ');
    if(flagg==2)
        putchar('\n');
    return;
}
int n,a,b,i,j,f[5005][5005][2],sum[5005][5005][2],sum2[5005],sum3[5005],flag[5005],ans;
int main(){
	n=read();a=read();b=read();
	if(a<b)
		swap(a,b);
	sum[0][0][0]=1;
	sum[0][0][1]=1;
	sum2[0]=1;
	flag[0]=1;
	for(i=1;i<=n;i++){
		if(i>=b)
			f[i][0][1]=(sum2[i-1]-sum2[i-b]+mo)%mo;
		else
			f[i][0][1]=sum2[i-1];
		sum[i][0][1]=f[i][0][1];
		for(j=1;j<a&&j<=i;j++){
			f[i][j][0]=sum[i-1][j-1][1];
			if(j>=b)
				f[i][j][1]=sum[i-b][j-b][0];
			sum[i][j][0]=(sum[i-1][j-1][0]+f[i][j][0])%mo;
			sum[i][j][1]=(sum[i-1][j-1][1]+f[i][j][1])%mo;
			sum2[i]=(sum2[i]+f[i][j][0])%mo;
		}
		sum2[i]=(sum2[i]+sum2[i-1])%mo;
		flag[i]=f[i][0][1];
	}
	
	sum3[0]=1;
	for(i=1;i<=n;i++){
		if(i>=b)
			f[i][0][1]=(sum3[i-1]-sum3[i-b]+mo)%mo;
		else
			f[i][0][1]=sum3[i-1];
		sum[i][0][1]=f[i][0][1];
		for(j=1;j<=i;j++){
			f[i][j][0]=sum[i-1][j-1][1];
			if(j>=b)
				f[i][j][1]=sum[i-b][j-b][0];
			if(j>=a){
				ans=(1LL*f[i][j][0]*flag[n-i]+ans)%mo;
				if(i==n)
					ans=(f[i][j][1]+ans)%mo;
			}
			sum[i][j][0]=(sum[i-1][j-1][0]+f[i][j][0])%mo;
			sum[i][j][1]=(sum[i-1][j-1][1]+f[i][j][1])%mo;
			sum3[i]=(sum3[i]+f[i][j][0])%mo;
		}
		sum3[i]=(sum3[i]+sum3[i-1])%mo;
	}
	pus(ans,2);
    return 0;
}