import numpy as np
NM = input()
N, M = NM.split(" ")
del NM
N, M = int(N), int(M)
broken_steps = [int(input()) for num in range(M)]

all_steps = np.ones(N+1, dtype=np.float128)
all_steps[broken_steps] = 0
ok_steps = all_steps
del all_steps

for num in reversed(range(0,len(ok_steps)-2)):
  if ok_steps[num]==0:
    pass
  else:
    ok_steps[num] = ok_steps[num+1] + ok_steps[num+2]

#print(ok_steps[-20:].astype(int))
print(ok_steps[0].astype(int)%1000000007)