package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

const MOD = 1000000007

func main() {
	sc := NewScanner()
	N, M := sc.nextInt(), sc.nextInt()
	breaked := make(map[int]bool)
	for i := 0; i < M; i++ {
		breaked[sc.nextInt()] = true
	}
	memo := make([]int, N+2)
	var dfs func(num int)
	dfs = func(num int) {
		if num == N {
			memo[num] = 1
			return
		}
		for i := 1; i <= 2; i++ {
			if breaked[num+i] || num+i > N {
				continue
			}
			if memo[num+i] > 0 {
				continue
			}
			dfs(num + i)
		}
		memo[num] = memo[num+1]%MOD + memo[num+2]%MOD
		memo[num] %= MOD
	}
	dfs(0)
	fmt.Println(memo[0])
}
