import sequtils, strutils, algorithm

let (n,m) = (let t = stdin.readline.split.map(parseInt);(t[0],t[1]))
var p = newSeq[int](n+2)
var d = newSeq[bool](n+1)
for i in 0..<m:
    d[stdin.readline().parseInt] = true

p[0] = 1
for i in 0..n-1:
    if d[i]: continue
    p[i+1] += p[i]
    p[i+2] += p[i]

let ans = if d[n]:0 else: p[n]
echo ans mod 1_000_000_007