using System;
using System.Text;
using System.Diagnostics;
using System.Numerics;
using System.Collections.Generic;

class Myon

{
    public Myon() { }
    public static int Main()
    {
        cin = new Scanner();
        new Myon().calc();
        return 0;
    }
    static Scanner cin;

    void calc()
    {
        long mod = 1000000007;


        int N = cin.nextInt();
        int A = cin.nextInt();
        int B = cin.nextInt();
        if (A > B) swap(ref A, ref B);

        int[] num = new int[] { A, B };
        long[,] adddp = new long[B + 1, 2];
        for (int i = 0; i < A; i++)
        {
            adddp[i, 0] = 1;
        }

        long[] dp2 = new long[B + 1];
        long[] sum = new long[B + 1];
        dp2[0] = 1;
        sum[0] = 1;
        for (int i = 1; i < B + 1; i++)
        {
            for (int j = 0; j < i - A; j++)
            {
                dp2[i] += sum[j];
            }
            dp2[i] %= mod;
            
            sum[i] = sum[i - 1] + dp2[i];
            if (sum[i] >= mod) sum[i] -= mod;
        }

        for (int i = 1; i < B + 1; i++)
        {
            adddp[i, 1] = sum[i - 1];
        }


        long[,] dp = new long[N + 3, 2];
        dp[0, 1] = 1;
        dp[B, 0] = sum[B - 1];

        for (int i = 0; i < N + 3; i++)
        {
            for (int j = 0; j < 2; j++)
            {
                //if (dp[i, j] == 0) continue;
                for (int k = 1; k < num[j]; k++)
                {
                    if (i + k >= dp.GetLength(0)) break;
                    dp[i + k, 1 - j] += dp[i, j] * adddp[k, j];
                    dp[i + k, 1 - j] %= mod;
                }
            }
        }

        long all = 1;
        for (int i = 0; i < N; i++)
        {
            all *= 2;
            all %= mod;
        }

        long ans = all - (dp[N + 2, 0] + dp[N + 2 - B, 1] * sum[B - 1]);
        ans %= mod;
        ans += mod;
        ans %= mod;

        Console.WriteLine(ans);

    }

    void swap<T>(ref T a, ref T b)
    {
        T c = a;
        a = b;
        b = c;
    } 
}


class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextInt() + add;
        }
        return Array;
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextLong() + add;
        }
        return Array;
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }


    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextDouble() + add;
        }
        return Array;
    }
}


Measured memory_bytes: 27776