mod = 10**9+7
n, m = map(int, input().split())
l = [int(input()) for _ in range(m)]

t2 = 1
t1 = 0 if 1 in l else 1

if n == 1:
  print(1)
else:
  for i in range(2,n+1):
    if l == [] or i != l[0]:
      t0 = 0 if i in l else (t2+t1)%mod
    else:
      l.pop(0)
      t0 = 0
    t2 = t1
    t1 = t0
  print(t0)