N, M = map(int, input().split())
MOD = 10 ** 9 + 7
broken = []
for i in range(0, M):
  broken.append(int(input()))

memo = [0] * (N+1)
memo[0] = 1
cnt = 1
while cnt <= N:
  if cnt in broken:
    memo[cnt] = 0
  elif cnt == 1:
    memo[cnt] = 1
  else:
    memo[cnt] = (memo[cnt-1] + memo[cnt-2])%MOD
  cnt += 1
  
print(memo[N])