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