import numpy as np
NM = input()
N, M = NM.split(" ")
del NM
N, M = int(N), int(M)
#all_steps = [num for num in range(N+1)]
all_steps = list(np.ones((1, N+1), dtype=np.int32)[0])
broken_steps = [int(input()) for num in range(M)]
ok_steps = [0 if num in broken_steps else 1 for num in range(len(all_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

#temp0 = [ok_steps[(num + 1)] + ok_steps[(num + 2 )] if ok_steps[num]==1 else 0 for num in reversed(range(len(ok_steps)-2)) ]
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)