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 long[] 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 long[N + 1];
        int[] a = new int[M];
        for (int i = 0; i < M; i++)
        {
            a[i] = int.Parse(Console.ReadLine());
        }

        int iter_in_a = 0;

        for (int i = 0; i <= N; i++)
        {
            if (i == 0)
            {
                steps[i] = 1;
            }
            else if (i == 1)
            {
                if (a[iter_in_a] == i)
                {
                    iter_in_a++;
                    continue;
                }
                else
                {
                    steps[i] = 1;
                }

            }
            else
            {
                if (a[iter_in_a] == i)
                {

                    if (iter_in_a < a.Length - 1) iter_in_a++;
                    steps[i] = 0;

                }
                else
                {
                    steps[i] = steps[i - 1] + steps[i - 2];
                    if (steps[i] >= 1000000007)
                    {
                        steps[i] %= 1000000007;
                                 //1000000007

                    }
                }

            }

        }
        Console.WriteLine(steps[N]);

    }



}