let input = readLine()!.characters.split(" ").map{Int(String($0))!}
let (N, M) = (input[0], input[1])
var steps = (0...N).map{_ in 0}
(0..<M).forEach{_ in steps[Int(readLine()!)!] = 1}
var dp = (0...N+1).map{_ in 0}
dp[N] = 1
for i in (0..<N).reverse() {
    if steps[i] == 0 {
        dp[i] = (dp[i+1] + dp[i+2]) % 1000000007
    }
}
print(dp[0])