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

div = 1e9 + 7
step = [0] * (N+1)
step[0] = 1

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

  if n == 1:
    step[n] = 1
  else:
    step[n] = int((step[n-2] + step[n-1]) % div)

ans = step[N]
print(ans)