#coding utf-8
N,M=map(int,input().split())
a =[int(input()) for i in range(M)]
mod =10**9+7
dp = [1]
for i in range(1,N+1):
  if i in a:
    dp.append(0)
  else:
    if i ==1:
      dp.append(dp[i-1])
    else:
      dp.append((dp[i-1]+dp[i-2])%mod)

print(dp[N])