n,m=map(int,input().split())
mod = 10 ** 9 + 7
li=[int(input()) for i in range(m)] # 壊れてる段

for i in range(n+1):
  # i-2までがa, i-1までがb
  if i == 0:
    a=1
  elif i == 1:
    if 1 in li:
      a,b=1,0
    else:
      a,b=1,1
  else:
    if i-2 in li and i-1 in li:
      print(0)
      exit()
    elif i-2 in li and i-1 not in li:
      a,b = b,b
    elif i-2 not in li and i-1 in li:
      a,b = 0,a
    else:
      a,b = b,(a+b) % mod
print(b)