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
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#include <bits/stdc++.h>
using namespace std;
template<class t> inline t read(t &x){
	char c=getchar();bool f=0;x=0;
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if(f) x=-x;return x;
}
template<class t,class ...A> inline void read(t &x,A &...a){
	read(x);read(a...);
}
template<class t> inline void write(t x){
	if(x<0) putchar('-'),write(-x);
	else{if(x>9) write(x/10);putchar('0'+x%10);}
}

const int N=5005,mod=1e9+7;
int f[N][2],g[N][2],n,A,B,ans;

signed main(){
	read(n,A,B);
	if(A>B) swap(A,B);
	f[0][0]=f[0][1]=1;
	for(int i=1;i<B;i++){
		for(int j=A;j<=i;j++) f[i][0]=(f[i][0]+f[i-j][1])%mod;
		for(int j=1;j<=i;j++) f[i][1]=(f[i][1]+f[i-j][0])%mod;
	}
	for(int i=1;i<n;i++){
		if(i<A) g[i][0]=1;
		for(int j=1;j<A&&j<i;j++) g[i][0]=(g[i][0]+g[i-j][1])%mod;
		if(i<B) g[i][1]=f[i][1];
		for(int j=1;j<B&&j<i;j++) g[i][1]=(g[i][1]+1ll*g[i-j][0]*f[j-1][1]%mod)%mod;
		if(n-i<A) ans=(ans+g[i][1])%mod;
		if(n-i<B) ans=(ans+1ll*g[i][0]*f[n-i][1]%mod)%mod;
	}
	int pw2=1;
	for(int i=1;i<=n;i++) pw2=(pw2+pw2)%mod;
	write((pw2+mod-ans)%mod);
}