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

public class Program {
    public static void Main() {
        var arr = Console.ReadLine().Split(' ').Select(t => int.Parse(t)).ToArray();
        var n = arr[0];
        var m = arr[1];

        var brokenStair = new int[m];
        for (int i = 0; i < m; i++) {
            brokenStair[i] = int.Parse(Console.ReadLine());
        }
        memo  = new Dictionary<int, long>();
        var score = Route(n, brokenStair) % 1000000007;
        Console.WriteLine(score);
    }

    static Dictionary<int, long> memo;

    static long Route(int step, int[] brokenStair) {
        long ret;

        if (memo.TryGetValue(step, out ret)) {
            return ret;
        }

        if (brokenStair.Contains(step)) {
            memo.Add(step, 0);
            return 0;
        }

        if (step == 1) {
            var val = brokenStair.Contains(1) ? 0 : 1;
            memo.Add(1, val);
            return val;
        }

        if (step == 2) {
            int val;

            if (brokenStair.Contains(2))
                val = 0;
            else if (brokenStair.Contains(1))
                val = 1;
            else
                val = 2;

            memo.Add(2, val);
            return val;
        }

        var stairMinus2 = Route(step - 2, brokenStair);
        var stairMinus1 = Route(step - 1, brokenStair);

        ret = stairMinus1 + stairMinus2;
        memo[step] = ret;

        return ret;
    }
}
