import sequtils, strutils, algorithm

let (n,m) = (let t = stdin.readline.split.map(parseInt);(t[0],t[1]))
if(n<m*2):
    echo 0
    quit
    
var dp = newSeq[int](n+2)
var ng = newSeq[bool](n+1)
for i in 0..<m:
    ng[stdin.readline().parseInt] = true


dp[0] = 0
dp[1] = 1
for i in 1..n:
    let now = dp[i-1]+dp[i]
    if ng[i]:
        dp[i+1] = 0
    else:
        dp[i+1] = if 1_000_000_007<=now:(now mod 1_000_000_007)else: now

echo dp[n+1]