n,m=map(int,input().split())
step=list(range(n+1))
mod=10**9+7
for i in range(m):
    step.remove(int(input()))
dp=[0]*n+1
dp[0]=1
if step[1]==1:
    dp[1]=1
    step.remove(1)
step.remove(0)
for i in step:
    dp[i]=(dp[i-1]+dp[i-2])
print(dp[n]%mod)