n,m = map(int,input().split())
mod = 1000000007
falls = []

for j in range(m):
    falls.append(int(input())) 

results =[]

if 1 in falls:
    result = 0
else:
    result = 1

results.append(result)

if 2 in falls:
    result = 0
else:
    if results[0] == 0:
        result = 1
    else:
        result = 2

results.append(result)

for i in range(3,n+1):
    number = i

    if number in falls:
        result = 0

    else:
        result = (results[i-3] + results[i-2]) % mod

    results.append(result)

print(results[n-1])
