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 <cmath>
#include <functional>
#include <fstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <list>
#include <time.h>
#include <math.h>
#include <random>
#include <deque>
#include <queue>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <bitset>
#include <sstream>
#include <chrono>
#include <cstring>

using namespace std;

typedef long long ll;

#ifdef iq
  mt19937 rnd(228);
#else
  mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
#endif

const int M = 1e9 + 7;

int sum(int a, int b) {
  int c = a + b;
  if (c >= M) c -= M;
  if (c < 0) c += M;
  return c;
}

void add(int &a, int b) {
  a = sum(a, b);
}

int mul(int a, int b) {
  return (a * (ll) b) % M;
}

const int N = 5000 + 7;

int ans[N][2];
int fans[N][2];
int bad_block[N][2][2];

int main() {
#ifdef iq
  freopen("a.in", "r", stdin);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  if (a < b) swap(a, b);
  ans[0][0] = ans[0][1] = 1;
  fans[0][0] = fans[0][1] = 1;
  bad_block[0][0][1] = 1;
  bad_block[0][1][0] = 1;
  for (int i = 1; i <= n; i++) {
    if (i >= a) {
      for (int t = 0; t < 2; t++) {
        for (int z = 0; z < 2; z++) {
          bad_block[i][t][z] = 0;
        }
      }
    } else {
      for (int fir = 0; fir < 2; fir++) {
        for (int last = 0; last < 2; last++) {
          if (last) {
            for (int bl = b; bl <= i; bl++) {
              add(bad_block[i][fir][last], bad_block[i - bl][fir][last ^ 1]);
            }
          } else {
            for (int bl = 1; bl <= i; bl++) {
              add(bad_block[i][fir][last], bad_block[i - bl][fir][last ^ 1]);
            }
          }
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int bl = 1; bl < b && bl <= i; bl++) {
      add(ans[i][1], ans[i - bl][0]);
      add(fans[i][1], ans[i - bl][0]);
    }
    for (int j = 1; j <= i; j++) {
      for (int x = 0; x < 2; x++) {
        for (int y = 0; y < 2; y++) {
          add(ans[i][y], mul(bad_block[j][x][y], fans[i - j][x ^ 1]));
        }
      }
    }
  }
  int tot = 1;
  for (int i= 1; i <= n; i++)
    tot = mul(tot, 2);
  add(tot, -ans[n][0]);
  add(tot, -ans[n][1]);
  cout << tot << endl;
}
