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)
all_steps[broken_steps] = 0
ok_steps = list(all_steps)
del all_steps

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

ok_steps[0] = int(ok_steps[0])
print(ok_steps[0]%1000000007)