n,m=map(lambda x: int(x), input().split())
INF=10**12
dp=[INF]*n
for _ in range(m):
    dp[int(input())-1]=0
dp[0]=1 if dp[0]==INF else 0
dp[1]=dp[0]+1 if dp[1]==INF else 0
for i in range(2, n):
    if dp[i]==0:
        continue
    dp[i]=(dp[i-1]+dp[i-2])%(10**9+7)
print(dp[n-1])