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;
const int N = 5020;
const int mod=1e9+7;
typedef long long ll;
inline int add(int a,int b){a+=b;return a>=mod?a-mod:a;}
inline int sub(int a,int b){a-=b;return a<0?a+mod:a;}
inline int mul(int a,int b){return 1ll*a*b%mod;}
inline int qpow(int a,int b){int ret=1;for(;b;b>>=1,a=mul(a,a))if(b&1)ret=mul(ret,a);return ret;}

int g[N][2];
int f[N][2];
int ans=0, n, a, b;

int main()
{
	cin >> n >> a >> b;
	if(a>b)swap(a,b);
	if(b>1){
		f[0][0]=f[0][1]=1;
		for(int i=1;i<=n;i++){
			for(int k=0;k<2;k++){
				for(int j=1;j<=i;j++){
					if(k==0&&j<a)continue;
					f[i][k]=add(f[i][k],f[i-j][k^1]);
				}
			}
		}
		f[0][0]=0;
		for(int i=1;i<n;i++){
			if(i<a)g[i][0]=add(g[i][0],1);
			for(int j=1;j<min(i,a);j++){
				g[i][0]=add(g[i][0], g[i-j][1]);
			}
			if(i<b)g[i][1]=add(g[i][1], add(f[i-1][0],f[i-1][1]));
			for(int j=1;j<min(i,b);j++){
				int w=j==1?1:add(f[j-2][0],f[j-2][1]);
				g[i][1]=add(g[i][1],1ll*g[i-j][0]*w%mod);
			}
			if(n-i<b)ans=add(ans, mul(g[i][0], add(f[n-i-1][0],f[n-i-1][1])));
			if(n-i<a)ans=add(ans, g[i][1]);
		}
	}
	cout << sub(qpow(2,n), ans) << endl;
}
