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

namespace ProjectContest
{
    class Test
    {
        static void Main()
        {
            const int mod = 1000000007;
            var nm = Array.ConvertAll(Console.ReadLine().Split(), Convert.ToInt32);
            int n = nm[0], m = nm[1];
            var F = new int[n + 1];
            F[0] = F[1] = 1;
            var a = new int[m];
            for (int i = 0; i < m; i++) a[i] = Convert.ToInt32(Console.ReadLine());
            int count = 0;
            if (a[0] == 1) { F[1] = 0; count = 1; }
            for (int i = 2; i < n + 1; i++)
            {
                if (count<m&&i == a[count]) { F[i] = 0;count++; }
                else
                {
                    F[i] = (F[i - 1] + F[i - 2]) % mod;
                }
            }
            Console.WriteLine(F[n]);
        }

    }
}