N, M  = map(int, input().split())
a  = []
for _ in range(M):
  a.append(int(input()))
sdic  = {}
ans = 0
sdic[N] = 1
sdic[N+1] = 0
for n in reversed(range(N)):
  if n in a:
    sdic[n] = 0
    continue
  t = sdic[n+1] + sdic[n+2]
  if t == 0:
    print(0)
    quit()
  sdic[n] = t
  
print(sdic[0]%1000000007)