import strutils,sequtils
var
  N=stdin.readLine.split.map parseInt
  A=mapIt(1..N[1],stdin.readLine.parseInt)
  B=newSeqwith(N[0]+1,0)
B[0]=1
for i in 1..N[0]:
  if i notin A:
    B[i]=B[i-1]
    if i>1:
      B[i]+=B[i-2]
  B[i]=B[i]mod 1000000007
echo B[^1]