N,M=map(int,input().split())

dp=[0]*(N+1)
dp[0]=1
for _ in range(M):
    a=int(input())
    dp[a]=-1

for i in range(1,N+1):
    if dp[i]==-1:
        continue
    if dp[i-1]!=-1:
        dp[i]+=dp[i-1]
    if dp[i-2]!=-1:
        dp[i]+=dp[i-2]

if dp[-1]==-1:
    print(0)
else:
    print(dp[-1]%(10**9+7))
