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

step = [0] * (N+1)
if 1 in A:
  step[1] = 0
else:
  step[1] = 1
if 2 in A:
  step[2] = 0
else:
  step[2] = step[1] + 1

for i in range(3, N+1):
  if i in A:
    step[i] = 0
  else:
    step[i] = step[i-1] + step[i-2]
print(step[N]%(10**9+7))
