using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Q3
{
    class Program
    {
        static void Main(string[] args)
        {
            string line = Console.ReadLine();
            string[] strs = line.Split(' ');
            int N = int.Parse(strs[0]);
            int M = int.Parse(strs[1]);
            bool[] staris_broken = new bool[N];
            for (int i = 0; i < N; i++) staris_broken[i] = false;
            for(int i = 0; i < M; i++)
            {
                staris_broken[int.Parse(Console.ReadLine())] = true;
            }

            long[] count = new long[N+1];
            for (int i = 0; i <= N; i++) count[i] = 0;
            count[0] = 1;
            for(int i = 0; i < N; i++)
            {
                if ((i + 1 < N && !staris_broken[i + 1]) || i + 1 == N)
                {
                    count[i + 1] += count[i];
                }
                if ((i + 2 < N && !staris_broken[i + 2]) || i + 2 == N)
                {
                    count[i + 2] += count[i];
                }
            }

            Console.WriteLine(count[N] % 1000000007);
        }
    }
}
