N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
x = [None] * N
for n in range(N):
  if n + 1 in a:
    x[n] = 0
    continue
  elif n == 0:
    x[n] = 1
    continue
  elif n == 1:
    x[n] = x[n - 1] + 1
    continue
  x[n] = x[n - 1] + x[n - 2]
  if x[n] == 0 and x[n - 1] == 0:
    print(0)
    exit()
print(x[-1] % (10 ** 9 + 7))