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

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

results =[]

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

    if number in falls:
        result = 0

    else:
        if number == 1:
            result = 1
        elif number == 2:
            if results[0] == 0:
                result = 1
            else:
                result = 2
        else:
            result = (results[i-3] + results[i-2])%mod

    results.append(result)

print(results[n-1])