n,m = map(int,input().split(" "))
a=[]
mod = 10 ** 9 + 7
ans = 1
for i in range(m):
    a.append(int(input()))
    if a[i]-1 == a[i-1]:
        ans = 0

dp = [1] * (n+1)
for j in range(n+1):
    if j in a:
        dp[j] = 0
    elif j > 1:
        dp[j] = dp[j-1] + dp[j-2]

print(dp[n]%mod)
