using System;
using System.Collections.Generic;
using System.Linq;
class Program{
    static void Main(string[] args){
    var vals = Console.ReadLine().Split().Select(x => int.Parse(x)).ToList();
    int N=vals[0];
    int M=vals[1];
    int mod=1000000007;
    long[] d=new long[N+1];
    for(int i=0;i<M;i++){
        int a=int.Parse(Console.ReadLine());
        d[a]=-1;
    }
    d[0]=1;
    for(int i=1;i<N;i++){
        if(d[i+1]==-1) d[i+1]=0;
        else {
            if(i==1) d[i+1]=d[i];
            else d[i+1]=(d[i]+d[i-1])%mod;
        }
    }
    Console.Write(d[N]);
    }
}
