n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
if n == 1:
  print(1)
  exit()
p = [0]*n
if a.count(1) == 0:
  p[0] = 1
else:
  p[0] = 0
if a.count(2) == 0:
  p[1] = 1 + p[0]
else:
  p[1] = 0
if n > 2:
  for i in range(2,n):
    if a.count(i+1) == 1:
      p[i] = 0
    else:
      p[i] = (p[i-1] + p[i-2]) % 1000000007
print(p[n-1])
