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

mod = 10**9 + 7

if N == 1:
  print(1)
else:
  i1 = 1
  if 1 in A:
    i2 = 0
  else:
    i2 = 1
  for n in range(2, N+1):
    i3 = (i1 + i2) % mod
    if n in A:
      i3 = 0
    if (n-1 in A) and (n in A):
      print(0)
      break
    i1, i2 = i2, i3
  else:
    ans = i3
    print(ans)