package main

import (
    "fmt"
    "math"
)

func min(nums ...int) int {
    res := nums[0]
    for i := 0; i < len(nums); i++ {
        res = int(math.Min(float64(res), float64(nums[i])))
    }
    return res
}

func main() {
    var N, M int
    fmt.Scan(&N, &M)
    var broken = make([]bool, N+1)
    for i := 0; i < M; i++ {
        var a int
        fmt.Scan(&a)
        broken[a] = true
    }
    var dp = make([]int, N+1)
    dp[0] = 1
    for i := 2; i <= N; i++ {
        dp[i] = dp[i-1]
        if i -2 >= 0 {
            dp[i] += dp[i-2]
        }
        dp[i] %= 1000000007
        if broken[i] {
            dp[i] = 0
        }
    }
    fmt.Println(dp[N])
}