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