package main

import (
	"fmt"
)

const mod = 1000000007

func main() {
	var n, m int
	fmt.Scan(&n, &m)
	n++
	mp := make(map[int]int)
	for i := 0; i < m; i++ {
		var tmp int
		fmt.Scan(&tmp)
		mp[tmp] = 1
	}
	dp := make([]int, n)
	if mp[1] == 0 {
		dp[1] = 1
	}
	if mp[2] == 0 {
		dp[2] = dp[1] + 1
	}
	for i := 3; i < n; i++ {
		if mp[i] == 1 {
			continue
		}
		dp[i] = dp[i - 1] % mod + dp[i - 2] % mod
	}
	fmt.Println(dp[n - 1] % mod)
}