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

namespace ConsoleApp
{
    class Program
    {
        static long?[] num;
        static int[] a;
        static int goal;

        static void Main(string[] args)
        {
            var ss = Console.ReadLine().Split();
            goal = int.Parse(ss[0]);
            var M = int.Parse(ss[1]);

            a = new int[M];
            for (int i = 0; i < a.Length; i++)
            {
                a[i] = int.Parse(Console.ReadLine());
            }

            num = new long?[goal + 2];
            var number = BTree(0);

            Console.WriteLine(number % 1000000007);
        }

        static long? BTree(int current)
        {
            if (num[current] != null) return num[current];

            if (a.Contains(current))
            {
                return 0;
            }

            if (current == goal)
            {
                return 1;
            }

            var add1 = (current + 1 > goal) ? 0 : BTree(current + 1);
            var add2 = (current + 2 > goal) ? 0 : BTree(current + 2);

            num[current] = add1 + add2;
            return num[current];
        }
    }
}