MOD=10**10+7
n,m = list(map(int, input().split()))
a = set([int(input()) for _ in range(m)])

dp = [0] * (n+1)

init=1
for i in range(1, n+1):
    if i not in a:
        dp[i]=init
        init+=1
        if init > 2:
            break

for step in range(i+1, n+1):
    if dp[step-1]==0 and dp[step-2]==0:
        break
    if step not in a:
        dp[step] = (dp[step-1] + dp[step-2])%MOD
print(dp[-1])