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

dp = [0]*(N+1) # 初期条件
dp[0] = 1
dp[1] = 0 if 1 in H else 1
for i in range(2,N+1):
  if i in H:
    dp[i] = 0
  else:
    dp[i] = (dp[i-1]+dp[i-2])%1000000007