N,M = map(int,input().split())
A = list(map(int,[input() for i in range(M)]))

dp = {i:0 for i in A}

dp[0]=1 # 0段目
if A[0]==1:
  dp[1]=0
  A.remove(1)
else:
  dp[1]=1

safe_stairs = list(range(2,N+1))
[safe_stairs.remove(int(a)) for a in A]
  
for i in safe_stairs:  
  dp[i]= int(dp[i-1]+dp[i-2])
print(dp[N]%1000000007)  