package main

import (
	"fmt"
)

const mod = 1e9+7

func contains(s []int, e int) bool {
	for _, v := range s {
		if e == v {
			return true
		}
	}
	return false
}

func main() {
	var n,m int
	fmt.Scan(&n,&m)
	
	a := make([]int, m)
	for i:=0;i<m;i++ {
		fmt.Scan(&a[i])
	}
	dp := make([]int, n+1)
	dp[0] = 1
	if contains(a,1) {
		dp[1] = 0
	} else {
		dp[1] = 1
	}
	for i:=2;i<n+1;i++{
		if !(contains(a,i)) {
			dp[i] = dp[i-2]+dp[i-1]
			dp[i]%=mod
		} else {
			dp[i] = 0
		}
	}
	fmt.Println(dp[n]%mod)
}