n,m = map(int,input().split())
li = [int(input()) for _ in range(m)]
mod = 10**9+7

dp = [0 if i in li else 1 for i in range(n+1)]

for i in range(2,n+1):
    if dp[i]==0:continue
    dp[i] = dp[i-2] + dp[i-1]
    dp[i]%mod
print(dp[-1]%mod)