N,M = map(int,input().split())
a = [1]*(N+1)
Answer = []
for i in range(M):
    a[int(input())-1]  = 0
Answer.append(1*a[0])
Answer.append(1*a[1]+1*a[0])
for j in range(2,N):
    A = ((Answer[j-1]%(10**9+7)) + (Answer[j-2]%(10**9+7)))*a[j]
    Answer.append(A%(10**9+7))
print(Answer[-1])