NM = input()
N, M = NM.split(" ")
del NM
N, M = int(N), int(M)
all_steps = [num for num in range(N+1)]
broken_steps = [int(input()) for num in range(M)]
ok_steps = []
for num in range(len(all_steps)):
  if num in broken_steps:
    ok_steps.append(0)
  else:
  	ok_steps.append(1)
del all_steps, broken_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]
    
print(ok_steps[0]%1000000007)