N, M = map(int, input().split())

broken = []
for _ in range(M):
  broken.append(int(input()))

mod = 10 ** 9 + 7
f = [0] * N
f[1] = 1
for i in range(1, N + 1):
  if i in broken:
    if i - 1 in broken:
      print(0)
      exit()
    continue
  f[i] = f[i-2] + f[i-1]
print(f[N] % mod)