import sys

N, M = map(int, input().split())
li = [int(input()) for i in range(M)]

count = 0
flag = False

dp = [0] * (N+1)

for n in range(1, N+1):
  if n == 1 and not n in li:
    dp[1] = 1
    continue
  
  if n == 2 and not n in li:
    dp[2] = dp[1] + 1
    continue
  
  if n in li:
    if flag:
      print(0)
      sys.exit()

    flag = True
    continue

  if not (n-1) in li:
    dp[n] += dp[n-1]
    
  if not (n-2) in li:
    dp[n] += dp[n-2]
    
  dp[n] %= 1000000007
    
  flag = False
  
print(dp[N]) 