package main

import "fmt"

var mod int = 1000000007
var N, M int
var a []int
var memo []int

func main() {
	fmt.Scan(&N, &M)

	a = make([]int, N+1)
	for i := 0; i < M; i++ {
		var t int
		fmt.Scan(&t)
		a[t] = 1
	}
	memo = make([]int, N+1)
	fmt.Println(dfs(N))
}

func dfs(n int) int {
	if n < 0 || a[n] == 1 {
		return 0
	}
	if memo[n] != 0 {
		return memo[n]
	}
	if n == 0 {
		return 1
	}

	x := map[bool]int{true: memo[n-1], false: dfs(n - 1)}[memo[n-1] != 0]
	y := map[bool]int{true: memo[n-2], false: dfs(n - 2)}[memo[n-2] != 0]

	memo[n] = (x + y) % mod
	return memo[n]
}
