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

class Program
{
    static void Main(string[] args)
    {
        string[] input = Console.ReadLine().Split(' ');
        long N = long.Parse(input[0]);
        long M = long.Parse(input[1]);
        long[] a = new long[M];
        ulong[] step = new ulong[N+1];
        for (long i = 0; i < M; i++)
        {
            a[i] = long.Parse(Console.ReadLine());
            step[a[i]] = 100;
        }
        for(long i = 0; i < N+1; i++)
        {
            if (i == 0) { step[i] = 1; }
            else if (i == 1&&step[i]==0) { step[i] = step[i - 1]; }
            else if (i >= 2&&step[i]==0)
            {
                if (step[i - 2] >= 0) { step[i] += step[i - 2]; }
                if (step[i - 1] >= 0) { step[i] += step[i - 1]; }
            }
            else { step[i] = 0; }
        }
        Console.WriteLine(step[N]%1000000007);
    }
}
