package main

import (
	"fmt"
)

func main() {
	var n, m int
	fmt.Scanf("%d %d\n", &n, &m)

	var x int
	a := makeTrueSlice(n+1)
	for i := 0; i < m; i++ {
		fmt.Scanf("%d", &x)
		a[x] = false}

	fmt.Println(resolve(n, a))
}

func resolve(n int, a []bool) int {
	dp := make([]int, n+1)
	dp[0] = 1
	
	mod := 1000000007
	for i := 1; i <= n; i++ {
		if a[i] {
			switch i {
			case 1:
				dp[i] = 1
				break
			default:
				dp[i] = dp[i-1] + dp[i-2]
			}
		}
	}
	return dp[n]%mod
}

func makeTrueSlice(len int) []bool {
	slice := make([]bool, len)
	for i := 0; i<len; i++ {
		slice[i] = true
	}
	return slice
}