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>

namespace IO
{
char gc()
{
#ifdef FREAD
	static char buf[1<<21], *P1 = buf, *P2 = buf;
	if(P1 == P2)
	{
		P1 = buf;
		P2 = buf + fread(buf, 1, 1<<21, stdin);
		if(P1 == P2) return EOF;
	}
	return *(P1++);
#else
	return getchar();
#endif
}
template<typename Tp> bool get1(Tp &x)
{
	bool neg = 0;
	char c = gc();
	while( c != EOF && (c < '0' || c > '9') && c != '-' ) c = gc();
	if(c == '-') c = gc(), neg = 1;
	if(c == EOF) return false;
	x = 0;
	for(; c>='0' && c<='9'; c = gc()) x = x*10 + c - '0';
	if(neg) x = -x;
	return true;
}
template<typename Tp> void printendl(Tp x)
{
	if(x<0)putchar('-'),x=-x;
	static short a[40], sz;
	sz = 0;
	while(x>0)a[sz++]=x%10,x/=10;
	if(sz==0)putchar('0');
	for(int i=sz-1; i>=0; i--)putchar('0'+a[i]);
	puts("");
}
} // namespace IO
using IO::get1;
using IO::printendl;
#define get2(x,y) get1(x) && get1(y)
#define get3(x,y,z) get2(x,y) && get1(z)
#define get4(x,y,z,w) get3(x,y,z) && get1(w)
#define pb push_back
#define mp std::make_pair
#define ff first
#define ss second
typedef long long LL;
typedef unsigned long long uLL;
typedef std::pair<int,int> pii;
const int inf = 0x3f3f3f3f;
const LL Linf = 1ll<<61;

const int mod = 1e9 + 7;
int qpow(int x, int y)
{
	int ret = 1;
	while(y)
	{
		if(y & 1) ret = 1ll * ret * x % mod;
		x = 1ll * x * x % mod;
		y >>= 1;
	}
	return ret;
}

const int maxn = 5111;
int dp[maxn][maxn][2], pre1[maxn][maxn][2], pre2[maxn];
int n, a, b;

inline void add(int &x, int y) { x += y; if(x >= mod) x -= mod; }
int main()
{
	get3(n, a, b);
	if(a > b) std::swap(a, b);
	if(a <= b)
	{
		dp[0][0][0] = dp[0][0][1] = 1;
		for(int i=0; i<=n; i++)
		{
			if(i > 0)
			{
				for(int j=0; j<=i; j++) for(int tp=0; tp<2; tp++)
				{
					add(pre1[i][j][tp], pre1[i-1][j][tp]);
					dp[i][j][tp] = pre1[i][j][tp];
				}
				add(pre2[i], pre2[i-1]);
				add(dp[i][i][0], pre2[i]);
			}
			
			for(int j=0; j<=i; j++) for(int tp=0; tp<2; tp++) if(dp[i][j][tp])
			{
				// dp[i][j][tp] -> dp[i+k][j][tp ^ 1]
				int lb = i + (tp == 1 ? a : 1), rb = std::min(n, j + b - 1);
				// printf("i= %d j= %d tp= %d dp= %d\n", i, j, tp, dp[i][j][tp]);
				if(lb <= rb)
				{
					add(pre1[lb][j][tp^1], dp[i][j][tp]);
					add(pre1[rb+1][j][tp^1], mod - dp[i][j][tp]);
				}
				
				if(tp == 1)
				{
					int lb = i + 1, rb = std::min(n, i + a - 1);
					// if(i == 2) printf("j= %d tp= %d lb= %d rb= %d\n", j, tp, lb, rb);
					if(lb <= rb)
					{
						add(pre2[lb], dp[i][j][tp]);
						add(pre2[rb+1], mod - dp[i][j][tp]);
					}
				}
			}
		}
		int ans = 0;
		for(int i=1; i<=n; i++) for(int j=0; j<2; j++) add(ans, dp[n][i][j]);
		ans = (qpow(2, n) + mod - ans) % mod;
		printendl(ans);
	}
	return 0;
}