using System;
using System.Linq;

namespace abc129
{
    class C2
    {

        const int MOD = 1000000007;
        static public bool[] isHolls;

        static void Main(string[] args)
        {
            var input = Input.IntArray();
            var N = input[0];
            var M = input[1];

            isHolls = new bool[N + 1];

            for (int i = 0; i < M; i++)
            {
                isHolls[Input.Int()] = true;
            }

            var dp = new long[N + 1];

            for (int now = 0; now < N; now++)
            {
                for (int next = now + 1; next < Math.Min(N, now + 2); next++)
                {
                    dp[next] += dp[now];
                    dp[next] %= MOD;
                }
            }

            Console.WriteLine(dp[N]);

        }


        /** Input Class */
        internal static class Input
        {
            /** input int */
            public static int Int() => int.Parse(Console.ReadLine());

            /** input str */
            public static string Str() => Console.ReadLine();

            /** input array of int */
            public static int[] IntArray() => Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            /** input array of string */
            public static string[] StrArray() => Input.Str().Split(' ');

            /** input array of char */
            public static char[] charArray() => Input.Str().ToCharArray();
        }

    }
}
