package main

import (
	"fmt"
	"math"
)

func abs(a int) int {
	return int(math.Abs(float64(a)))
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

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

	// calcCost
	s := [100000]int{1,1,2,3}

	for i := 0; i < m; i++ {
		fmt.Scan(&tmp)
		s[tmp] = -1
	}
	if s[1] == -1 {
		s[1] = 0
	}

	for i:=2; i<=n; i++ {
		if s[i] == -1 {
			s[i] = 0
			continue
		}
		s[i] = (s[i-1] + s[i-2])
	}

	ans := s[n] % 1000000007
	fmt.Println(ans)
}