n, m = map(int, raw_input().split())
A = [int(raw_input()) for i in range(m)]
def solve(n, A):
  dp = [0] * (n + 1)
  ai = 0
  if ai < len(A) and A[ai] == 1:
    dp[1] = -1
    ai += 1
  else:
    dp[1] = 1
  if ai < len(A) and A[ai] == 2:
    dp[2] = -1
    ai += 1
  elif dp[1] != -1:
    dp[2] = 2
  else:
    dp[2] = 1
  for i in range(3, n + 1):
    if ai < len(A) and A[ai] == i:
      dp[i] = -1
      ai += 1
      continue
    if dp[i-2] != -1:
      dp[i] = dp[i-2] 
    if dp[i-1] != -1:
      dp[i] += dp[i-1]
  return dp[n] % (10**9+7)
print solve(n, A)