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

for i in range(2,n+1):
  t0 = 0 if i in l else (t2+t1)%mod
  t2 = t1
  t1 = t0

print(t0)