input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
line = lines.shift().split(' ')
N = line[0] * 1
K = line[1] * 1 

MOD = 1000000007

dp = new Array(N+1).fill(0)
dp[0] = 1

A = []
for (i=0; i<K; i++) {
    A[lines[i] * 1] = true
}

for (i=0; i<N; i++) {
    dp[i+1] += A[i+1] ? 0 : dp[i] % MOD
    dp[i+2] += A[i+2] ? 0 : dp[i] % MOD
}

console.log(dp[N] % MOD)
