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

class Mondai
{
    static void Main()
    {
        var waru= 1000000007;
        var nm = Console.ReadLine().Split(' ').Select(x => Int32.Parse(x)).ToArray();
        var N = nm[0];
        var M = nm[1];
        var a = new int[M];
        for (int i=0;i<M;++i) a[i] = Int32.Parse(Console.ReadLine());
        var dp = new int[N + 1];
        dp[0] = 1;
        for (int i=1;i<=N;++i)
        {
            if (a.Contains(i)) continue;
            dp[i] = (dp[i]+dp[i - 1])% waru;
            if(2<=i)dp[i] = (dp[i]+dp[i - 2])% waru;
        }
        Console.WriteLine(dp[N]);
    }
}