package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	list := make([]int, m)
	broken := make([]bool, n+1)
	for i := 0; i < m; i++ {
		fmt.Scan(&list[i])
		broken[list[i]] = true
	}

	dp := make([]int, n+1)
	dp[0] = 1
	if !broken[1] {
		dp[1] = 1
	}
	for i := 2; i <= n; i++ {
		if !broken[i] {
			if !broken[i-1] {
				dp[i] += dp[i-1]
			}
			if !broken[i-2] {
				dp[i] += dp[i-2]
			}
		}
	}
	fmt.Println(dp[n] % 1000000007)
}
