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

namespace Typical_Stairs1
{
    class Program
    {
        static void Main(string[] args)
        {
            /* 命名規則:変数名は小文字で始めましょう(C#界で決まってる)
             * 小文字　ローカル変数
             * 大文字　関数名　クラス名　その他
             */

            string input = ReadLine();
            ulong totalStep = 0; //←不必要な割当
            ulong totalBrokenStep = 0;
            ulong count = 0;
            string[] array = input.Split(' ');
            totalStep = ulong.Parse(array[0]);
            totalBrokenStep = ulong.Parse(array[1]);

            ulong[] step = new ulong[totalStep];
            ulong[] BrokenStep = new ulong[totalBrokenStep + 2];

            for (ulong i = 0; i < totalBrokenStep; i++)
            {
                BrokenStep[i] = ulong.Parse(ReadLine());
            }

            step[0] = 1;
            step[1] = 2;

            if (BrokenStep[0] == 1)
            {
                step[0] = 0;
                step[1] = 1;
                count++;
            }
            if (BrokenStep[0] == 2)
            {
                step[1] = 0;
                count++;
            }
            if (BrokenStep[1] == 2)
            {
                step[1] = 0;
                count++;
            }

            for (ulong i = 2; i < totalStep; i++)
            {
                if (i == BrokenStep[count] - 1)
                {
                    step[i] = 0;
                    count++;

                }
                else
                {
                    step[i] = step[i - 1] + step[i - 2];
                }
            }

            //定数！
            const int N = 1_000_000_007;
            WriteLine(step[totalStep - 1] % N);
            ReadKey();
        }
    }
}
