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

mod = 10**9 + 7
for n in range(N+1):
  if N == 1:
    ans = 1
    break
  elif n == 0:
    i1 = 1
  elif n == 1:
    i2 = 1
    if n in A:
      i2 = 0
  else:
    i3 = (i1 + i2) % mod
    if n in A:
      i3 = 0
    i1, i2 = i2, i3
else:
  ans = i3
print(ans)