import sys

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

dp = [0] * (N+3)

if 1 in li:
  dp[1] = 0
  dp[2] = 1
else:
  dp[1] = 1
  dp[2] = 2
  
if 2 in li:
  dp[2] = 0

for n in range(1, N+1):
  if n == 1 or n == 2:
    continue
  
  if n in li:
    if flag:
      print(0)
      sys.exit()
    
    flag = True
    continue
  
  dp[n] = (dp[n-1] + dp[n-2]) % 1000000007
  flag = False
  
print(dp[N])  