N,M = map(int,input().split())
A = []
MOD = 10**9+7
memo = {}
for _ in range(M):
  A.append(int(input()))
def step(cur):
  global res
  if cur in memo:
    return memo[cur]
  if cur == N:
    memo[cur] = 1
    return memo[cur]
  if cur > N or cur in A:
    memo[cur] = 0
    return memo[cur]

  memo[cur] = (step(cur+1) + step(cur+2))%MOD
  return memo[cur]

res = 0
print(step(0)%MOD)
