N, M =map(int, input().split())
a =[1]*N
mod = 1000000007
for i in range(M):
  a[int(input())-1]=0

dp = [0]*N

dp[0] = a[0]*1
dp[1] = (dp[0] + 1)*a[1]

for i in range(2,N):
  dp[i] = (dp[i-1]+dp[i-2]) *a[i]
  
print(dp[-1]%mod)
  