N, M = [int(nm) for nm in input().split()]
A = []
for m in range(M):
  A.append(int(input()))

for n in range(N, -1, -1):
  if n == N:
    i2 = 1
  elif n == N-1:
    i1 = 1
    if n in A:
      i1 = 0
  else:
    i = i1 + i2
    if n in A:
      i = 0
    i1, i2 = i, i1

ans = i % (10**9 + 7)
print(ans)