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 "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr double EPS = 1e-9;

//int N, M, K, H, W, L, R;
long long int N, M, K, H, W, L, R;

int dp[5001][2][5001][2];

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> N >> L >> R;
	if (L > R)swap(L, R);
	dp[0][1][0][0] = 1;
	for (int i = 0; i < N; i++) {
		for (int j = 0; j < 2; j++) {
			if (j == 0) {
				for (int k = 0; k < N; k++) {
					for (int l = 0; l < 2; l++) {
						if (k + 1 < L) {
							dp[i + 1][j][k + 1][l] += dp[i][j][k][l];
							dp[i + 1][j][k + 1][l] %= MOD;
						}
						if (k < L) {
							dp[i + 1][j ^ 1][1][l] += dp[i][j][k][l];
							dp[i + 1][j ^ 1][1][l] %= MOD;
						}
						if (k >= L) {
							int nx = l;
							if (k + 1 >= R)nx = 1;
							dp[i + 1][j][k + 1][nx] += dp[i][j][k][l];
							dp[i + 1][j][k + 1][nx] %= MOD;
							dp[i + 1][j ^ 1][k + 1][nx] += dp[i][j][k][l];
							dp[i + 1][j ^ 1][k + 1][nx] %= MOD;
						}
					}
				}
			}
			else {
				for (int k = 0; k < N; k++) {
					for (int l = 0; l < 2; l++) {
						int nx = l;
						if (k + 1 == R)nx = 1;
						dp[i + 1][j][k + 1][nx] += dp[i][j][k][l];
						dp[i + 1][j][k + 1][nx] %= MOD;
						nx = l;
						if (L > 1) {
							dp[i + 1][j ^ 1][1][nx] += dp[i][j][k][l];
							dp[i + 1][j ^ 1][1][nx] %= MOD;
						}
						if (k + L >= R)nx = 1;
						if (i + L <= N) {
							dp[i + L][j ^ 1][k + L][nx] += dp[i][j][k][l];
							dp[i + L][j ^ 1][k + L][nx] %= MOD;
						}
					}
				}
			}
		}
	}
	/*
	for (int i = 0; i <= N; i++) {
		for (int j = 0; j < 2; j++) {
			for (int k = 0; k <= N; k++) {
				for (int l = 0; l < 2; l++) {
					cout << i << " " << j << " " << k << " " << l << " " << dp[i][j][k][l] << endl;
				}
			}
		}
	}
	*/
	int ans = 0;
	for (int i = 0; i < 2; i++) {
		for (int j = 0; j <= N; j++) {
			ans += dp[N][i][j][1];
			ans %= MOD;
		}
	}
	cout << ans << endl;
	return 0;
}