MOD=10**9+7
N,M=map(int,input().split())
A=[0]*M

for i in range(M):
    A[i]=(int(input())+1)

S=[0]*(N+2)
S[1]=1
for i in range(2,N+2):
    if(i not in A):
        S[i]=(S[i-1]+S[i-2])%MOD
    else:
        S[i]=0
print(S[N+1])