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;

typedef long long LL;

const int N=5000,mod=1000000007;

int add(int a,int b,int p=mod){return a+b>=p?a+b-p:a+b;}
int sub(int a,int b,int p=mod){return a-b<0?a-b+p:a-b;}
int mul(int a,int b,int p=mod){return (LL)a*b%p;}
void sadd(int &a,int b,int p=mod){a=add(a,b,p);}
void ssub(int &a,int b,int p=mod){a=sub(a,b,p);}
void smul(int &a,int b,int p=mod){a=mul(a,b,p);}
int Power(int a,int k,int p=mod){int res=1;for (;k;k>>=1,smul(a,a,p)) if (k&1) smul(res,a,p);;return res;}

int n,a,b;

void into(){
  scanf("%d%d%d",&n,&a,&b);
}

int f[N+9][2],g[N+9];

void Get_g(){
  if (a>b) swap(a,b);
  if (b==1) return;
  g[0]=f[0][0]=f[0][1]=1;
  for (int i=1;i<=n;++i){
	for (int j=1;j<=i;++j){
	  sadd(f[i][1],f[i-j][0]);
	  if (j>=a) sadd(f[i][0],f[i-j][1]);
	}
	g[i]=add(f[i][0],f[i][1]);
  }
}

int dp[N+9][2],sum[N+9],ans;

void Get_dp(){
  if (b==1) return;
  for (int i=1;i<n;++i){
	if (i<a) dp[i][0]=1;
	for (int j=1;j<i&&j<a;++j) sadd(dp[i][0],dp[i-j][1]);
	if (i<b) dp[i][1]=g[i-1];
	for (int j=1;j<i&&j<b;++j) sadd(dp[i][1],mul(dp[i-j][0],j==1?1:g[j-2]));
	if (n-i<b) sadd(ans,mul(dp[i][0],g[n-i-1]));
	if (n-i<a) sadd(ans,dp[i][1]);
  }
}

void work(){
  Get_g();
  Get_dp();
}

void outo(){
  printf("%d\n",sub(Power(2,n),ans));
}

int main(){
  into();
  work();
  outo();
  return 0;
}