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 <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <queue>
#include <stack>
#include <cstdlib>
#include <map>
#include <iomanip>
#include <set>
#include <stdio.h>
#include <ctype.h>
#include <random>
#include <string.h>
#include <cmath>
#include <unordered_map>
#include <cstdio>
using namespace std;
#define pie 3.141592653589793238462643383279
#define int long long
#define P pair<int,int>
#define all(vec) vec.begin(),vec.end()

int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
int lcm(int x, int y) {
	return x / gcd(x, y)*y;
}
int kai(int x, int y, int m) {
	int res = 1;
	for (int i = x - y + 1; i <= x; i++) {
		res *= i; res %= m;
	}
	return res;
}
int mod_pow(int x, int y, int m) {
	int res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}

int comb(int x, int y, int m) {
	if (y > x)return 0;
	return kai(x, y, m) * mod_pow(kai(y, y, m), m - 2, m) % m;
}

const int mod = 1000000007;

int n, a, b;
int d[5010][5010];
int cnt[5010];
int cnt1;
int ans = 1;

signed main() {
	cin >> n >> a >> b;
	for (int i = 1; i <= n; i++)ans = ans * 2 % mod;
	if (a == 1 || b == 1) {
		cout << ans << endl;
		return 0;
	}
	if (a > b)swap(a, b);
	d[0][0] = 1;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j < b; j++)d[i][j] = d[i - 1][j - 1];
		d[i][1] = (d[i][1] + cnt1) % mod;
		for (int j = 1; j < min(i + 1, b); j++)d[i][j] = (d[i][j] + cnt[i - j]) % mod;
		for (int j = 0; j < b; j++)cnt1 = (cnt1 + d[i - 1][j]) % mod;
		if (a <= i) {
			for (int j = 0; j < min(i + 1 - a, b); j++)cnt[i - a - j] = (cnt[i - a - j] + d[i - a][j]) % mod;
			for (int j = 0; j < min(i + 1 - a, b); j++)cnt1 = (cnt1 - d[i - a][j] + mod) % mod;
		}
		if (b <= i - 1)for (int j = 0; j < min(i - b + 3, b); j++)cnt[i - b + 2 - j] = (cnt[i - b + 2 - j] - d[i - b + 2][j] + mod) % mod;
		if (b == i - 1)cnt[0] = (cnt[0] - 1 + mod) % mod;
	}
	for (int i = n; i > n - a; i--) {
		for (int j = 0; j < b; j++)ans = (ans - d[i][j] + mod) % mod;
	}
	for (int i = n - a; i > n - b; i--) {
		for (int j = 0; j < b - (n - i); j++)ans = (ans - d[i][j] + mod) % mod;
	}
	cout << ans << endl;
}