import numpy as np
import sys

N, M = list(map(int, input().split()))
if M == 0:
  h = []
else:
  h = np.array(sys.stdin.readlines()).flatten().astype(int)

if N==1:
  print(1)
elif N==2:
  if M==1:
    print(1)
  else:
    print(2)
else:
  DP = np.zeros(N+1)
  DP[0] = 1
  if 1 in h:
    DP[1] = -1
  else:
    DP[1] = 1
  for i in range(2,N+1):
    if DP[i-2]<0 and DP[i-1]<0:
      print(0)
      exit()
    if i in h:
      DP[i] = -1
    else:
      if DP[i-1]>=0:
        DP[i] += DP[i-1]
      if DP[i-2]>=0:
        DP[i] += DP[i-2]
      DP[i] = DP[i] % 1000000007
  print(int(DP[N]))