using System;
using System.Collections.Generic;
using System.Linq;

public class ABC0129_A3v1 {
    private static void Main(string[] args) {
        var numStr = Console.ReadLine().Trim().Split();
        var numOfSteps = int.Parse(numStr[0]);
        var numOfOffLimitsPositions = int.Parse(numStr[1]);

        var offLimitsPositions = new int[numOfOffLimitsPositions];
        for (var index = 0; index < numOfOffLimitsPositions; index++) {
            var input = Console.ReadLine().Trim();
            offLimitsPositions[index] = int.Parse(input);
        }

        Compute(numOfSteps, offLimitsPositions);
    }

    private static void Compute(int numOfSteps, int[] offLimitsPositions) {
        var diffOfOffLimits = offLimitsPositions[0];
        long totalOfWayOfGoUp = CalcNumOfWayOfGoUp(diffOfOffLimits);

        for (var index = 1; index < offLimitsPositions.Length; index++) {
            diffOfOffLimits = offLimitsPositions[index] - offLimitsPositions[index - 1];
            totalOfWayOfGoUp = CalcNewTotalOfWayOfGoUp(totalOfWayOfGoUp, diffOfOffLimits);
        }

        diffOfOffLimits = numOfSteps - offLimitsPositions[offLimitsPositions.Length - 1];
        totalOfWayOfGoUp = totalOfWayOfGoUp * CalcNumOfWayOfGoUp(diffOfOffLimits) % 1000000007;

        OutputAnswer(totalOfWayOfGoUp.ToString());
    }

    private static long CalcNewTotalOfWayOfGoUp(long totalOfWayOfGoUp, int diffOfOffLimits) {
        if (diffOfOffLimits == 1) {
            return 0;
        }

        return totalOfWayOfGoUp * CalcNumOfWayOfGoUp(diffOfOffLimits) % 1000000007;
    }

    private static int CalcNumOfWayOfGoUp(int diffOfOffLimits) {
        if (diffOfOffLimits <= 1)
            return 1;

        var sequence = new int[diffOfOffLimits];
        sequence[0] = sequence[1] = 1;

        for (var index = 2; index < diffOfOffLimits; index++) {
            sequence[index] = sequence[index - 1] + sequence[index - 2];
        }

        return sequence[diffOfOffLimits - 1];
    }

    private static void OutputAnswer(string text) => Console.WriteLine(text);
}