N, M = map(int, input().split())
broken = []
for i in range(M):
  broken.append(int(input()))
a1, a2, a3 = 1, 0, 0
for i in range(1, N+1):
  a3 = a2
  a2 = a1
  if i in broken:
    a1 = 0
  else:
    a1 = (a2 + a3) % 1000000007
print(a1)