import numpy as np

N ,M = map(lambda x: int(x),input().split())
A = []
for i in range(M):
    A.append(int(input()))

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

for i in range(1,N+1):
    if i>=2:
        total[i] += total[i-2]
    if i>=1:
        total[i] += total[i-1]
    if i in A:
        total[i] = 0
    total[i] = total[i]%1000000007

print(int(total[N]))

