# -*- coding: utf-8 -*-
"""
Created on Mon Jun 10 20:26:39 2019

@author: plosi
"""
dp=[-1 for i in range(10**5+1)]


def f(x): 
    if x==0: 
        return 1 
    if x<0: 
        return 0 
    if dp[x]!=-1: 
        return dp[x] 
    val= (f(x-1)+f(x-2))%(1000000007) 
    dp[x]=val 
    return val

def main(): 
    N,M=input().split(" ") 
    N=int(N) 
    M=int(M) 

    for i in range(M): 
        dp[int(input())]=0 
    
    print((f(N-1)+f(N-2))%(1000000007)) 
    
main()   
    