import java.util.*

fun main(args: Array<String>){
	val sc = Scanner(System.`in`)
	val n = sc.nextInt()
	val m = sc.nextInt()
	val a = Array(m, { i -> (sc.nextInt()) })
	var dp = Array(n, { i -> 0 })
	for (i in 0..n-1){
		if (!a.contains(i+1)){
        	if (i == 0){
            	dp[i] = 1
            }
            else if (i == 1){
            	dp[i] = 1 + dp[i-1]
            }
        	else{
            	dp[i] = dp[i-2] + dp[i-1]
            }
        }
        if (dp[i] >= 1000000007) dp[i] %= 1000000007
    }
    println(dp[n-1])
}