'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const N = parseInt(args[0][0], 10)
	const M = parseInt(args[0][1], 10)
	const a = new Array(N + 2).fill(true)
	const dp = new Array(N + 2).fill(0)

	args.slice(1, M + 1).forEach(arg => {
		a[parseInt(arg[0], 10)] = false
	})

	dp[0] = 1

	for (let i = 0; i < N; i++) {
		for (let j = 1; j <= 2; j++) {
			if (a[i + j]) {
				dp[i + j] += dp[i]
				dp[i + j] = dp[i + j] % 1000000007
			}
		} 
	}

	console.log(dp[N])
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
