n,m=[int(i) for i in input().split()]
if(n<3):
    for 
dp=[100000]*(n+1)
dp[0]=0
dp[1]=1
dp[2]=2
for i in range(m):
    a=int(input())
    dp[a]=0
for i in range(3,n+1):
    if(dp[i]==0):
        continue
    dp[i]=(dp[i-1]+dp[i-2])%1000000007
print(dp[n])
