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