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