N, M = map(int, input().split())
A=[]
MOD=1000000007
for _ in range(M):
    a = int(input())
    A.append(a)

C = [0]*(N+1)
C[0]=1
#print(C)
for i in range(N):
    if i+1 not in A:
        C[i+1]+=C[i]%MOD
    if i+2 not in A and i<N-1:
        C[i+2]+=C[i]%MOD
    #print(C)
print(C[N]%MOD)
