import numpy as np

N ,M = map(lambda x: int(x),input().split())
A = list(range(1,N+1))
if M>0:
    for i in range(M):
        A.remove(int(input()))

total = [0]*(N+1)
total[0]=1

for i in A:
    if i>=2:
        total[i] += total[i-2]
    if i>=1:
        total[i] += total[i-1]

    total[i] = total[i]%1000000007

print(int(total[N]))

