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

div = 1e9 + 7
ans = 0
prev1 = 1
prev2 = 0

for n in range(1, N+1):
  if n in A:
    path = 0
  else:
    path = int((prev1 + prev2) % div)

  prev1, prev2 = path, prev1

print(path)