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 <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <vector>

#define X first
#define Y second
#define PB push_back

using namespace std;

typedef long long ll;
typedef pair < int, int > pii;
typedef vector < int > vi;

const int N = 5050;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;

int n, a, b, dp[N][N][2][2], pref[N][N][2][2], pos_pref[N][2][2];

inline int add(int A,int B){
	if(A + B >= MOD) 
		return A + B - MOD;
	return A + B;
}

inline int sub(int A, int B){
	if(A - B < 0)
		return A - B + MOD;
	return A - B;
}

void dinamika(){
	for(int k = 0;k <= n;k++){
		for(int fl = 0;fl < 2;fl++){
			for(int lst = 0;lst < 2;lst++){
				dp[n][k][fl][lst] = (n - k) >= b || fl;
				pref[n][k][fl][lst] = dp[n][k][fl][lst];
				if(n == k){
					pos_pref[n][fl][lst] = dp[n][n][fl][lst];
				}
			}
		}
	}
	for(int i = n - 1;i >= 0;i--){
		for(int k = i;k >= 0;k--){
			for(int lst = 0;lst < 2;lst++){
				for(int fl = 0;fl < 2;fl++){
					int ret = 0, tfl = fl || (i - k) >= b;
					if(!lst){
						ret = pref[i + 1][k][tfl][1];
					}
					else{
						if(a + i <= n){
							ret = pref[a + i][k][tfl][0];
							ret = add(ret, sub(pos_pref[i + 1][tfl][0], pos_pref[a + i][tfl][0]));					
						}
						else{
							ret = pos_pref[i + 1][tfl][0];
						}
					}
					dp[i][k][fl][lst] = ret;
					pref[i][k][fl][lst] = add(pref[i + 1][k][fl][lst], dp[i][k][fl][lst]);
					if(i == k){
						pos_pref[i][fl][lst] = add(dp[i][i][fl][lst], pos_pref[i + 1][fl][lst]);
					}
				}
			}
		}
	}
}

int main(){
	scanf("%d%d%d", &n, &a, &b);
	if(a > b) swap(a, b);
	dinamika();
	printf("%d\n", add(dp[0][0][0][0], dp[0][0][0][1]));
	return 0;
}