n, m = [int(i) for i in input().split()]
obs = []
idou = []

for i in range(m):
  obs.append(int(input()))
  
#i段目にいる確率
for i in range(n+1):
  if i==0:
    idou.append(1)
  elif i==1 and not(i in obs):
    idou.append(1)
  elif i in obs:
    idou.append(0)
  else:
    tasu = idou[-1] + idou[-2]
    tasu = tasu%1000000007
    idou.append(tasu)
    
print(idou[-1])