using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class ABC
{
    public static int[] steps;

    public static void Main()
    {
        var W = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int N, M;
        N = W[0];
        M = W[1];
        steps = new int[N + 1];
        int[] a = new int[M];
        for (int i = 0; i < M; i++)
        {
            a[i] = int.Parse(Console.ReadLine());
        }

        Console.WriteLine(step_count(N, a));

    }

    public static long step_count(int step, int[] broken)
    {

        if (steps[step] != 0) return steps[step];
        if (step == 0) return 1;
        if (step < 0) return 0;

        if (broken.Contains(step)) return 0;
        else
        {
            long check_over = step_count(step - 1, broken) + step_count(step - 2, broken);
            if (check_over > 100000007) check_over -= 100000007;
            steps[step] = (int)check_over;
            return check_over;
        }
    }

}