mod=1000000007
N,M=map(int,input().split())
dp=[0]*(N+1)
dp[0]=1
A=[int(input()) for i in range(M)]
for i in range(1,1+N):
    if i in A:
        continue
    else:
        if i==1:
            dp[i]=dp[i-1]%mod
        else:
            dp[i]=(dp[i-1]+dp[i-2])%mod
print(dp[N])