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 pi 3.1415926535897932384626
using namespace std;
      
struct P{
  int x,y;
  bool operator < (const P &a )const{
    //if(y!=a.y)
    return y>a.y;
  };

};

int a,b,c,d,i,n,m,e,k,dx[10]={1,0,-1,0,1,1,-1,-1},dy[10]={0,1,0,-1,1,-1,1,-1};
long long o[2][5010];
long long l[5010];
long long s[5010];
long long x,y,z,mod=1000000007,hf=(mod+1)/2;

//string r,r1;
char r[361];
vector<int> v[200101];
P u[1];
queue<int> q;
//set<int> s[2];
//stack<int> s;
map<int,int> p;
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//rng()
bool as(P a,P b)
{
  return a.x<b.x;
}

long long g(int n)
{
  if(n<0) return 0;
  if(n==0) return 1;
  if(s[n]>=0) return s[n];
  long long k=g(n-1);
  for(int t=b+1;t<=n;t++)
    k=(k+g(n-t))%mod;
  return s[n]=k;
}

long long f(int i,int n)
{
  if(n<0) return 0;
  if(n==0) return 1;
  if(o[i][n]>=0) return o[i][n];
  long long k=0;
  if(i)
  {
    for(int t=1;t<b;t++)
      k=(k+f(0,n-t))%mod;
  }
  else
  {
    //k=f(1,n-1);
    for(int t=1;t<c;t++)
    {
      int e=1;
      if(n==a) e--;
      if(n-t==0) e--;
      k=(k+f(1,n-t)*g(t-e)%mod)%mod;
    }
    
  }
  return o[i][n]=k;
}

int main()
{
  memset(s,-1,sizeof(s));
  memset(o,-1,sizeof(o));
  l[1]=l[2]=1;
  scanf("%d %d %d",&a,&b,&c);
  if(b>c) swap(b,c);
  /*for(int t=3;t<c;t++)
  {
    l[t]=g(t-1);
    printf("%lld\n",l[t]);
  }*/
  x=1;
  for(int t=1;t<=a;t++)
    x*=2,x%=mod;
  printf("%lld",(x-f(0,a)-f(1,a)+mod*2)%mod);
}

