import sys

N, M = map(int, input().split())
A = []

for m in range(M):
  if m == 0:
    A.append(int(input()))
    continue

  i = int(input())
  if A[-1] == i-1:
    print(0)
    sys.exit()

  A.append(i)

li = [0] * (N+1)
li[0] = 1


for n in range(1, N+1):
  if n in A:
    continue

  li[n] = li[n-1] + li[n-2]

print(li[-1] % (10**9 + 7))