package main

import "fmt"

func main() {
	var n, m int
	fmt.Scan(&n, &m)

	b := make(map[int]bool, m)
	var a int
	for i := 0; i < m; i++ {
		fmt.Scan(&a)
		b[a] = true
	}

	dp := make([]int, n+5)
	dp[0] = 1

	for i := 0; i <= n; i++ {
		if !b[i+1] {
			dp[i+1] += dp[i]
		}
		if !b[i+2] {
			dp[i+2] += dp[i]
		}
	}

	fmt.Println(dp[n] % (1e9 + 7))
}
