N, M = map(int,input().split())
A = []
dp = [0] * N
for i in range(M):
  A.append(int(input()))

  
for i in range(2):
  if not((i+1) in A):
    dp[i] = 1 + dp[i-1] + dp[i-2]
    
for i in range(2,N):
  if not((i+1) in A):
    dp[i] = dp[i-1] + dp[i-2]
print(dp[-1]%1000000007)