"use strict"

const MOD = 1000000007;

function main(arg) {
    let tmp = arg.trim().split('\n');
    let n = tmp[0].split(" ").map(Number)[0];
    let m = tmp[0].split(" ").map(Number)[1];
    tmp.shift()
    tmp = tmp.map(Number)

    let a = tmp
    let step = new Array(n + 1).fill(0)
    for (let i = 0; i < a.length; i++) {
        step[a[i]] = -1
    }

    step[0] = 1
    // console.log(step)

    for (let i = 0; i < n; i++) {
        if (step[i] == -1) continue
        if (step[i+1] != -1) {
            step[i+1] += step[i]
            step[i+1] %= MOD;
        }
        if (step[i+2] != -1) {
            step[i+2] += step[i]
            step[i+2] %= MOD;
        }
    }

    // for (let i = 0; i < n; i++) {
    //     if (step[i] == -1) continue;
    //     if (step[i+1] != -1){
    //         step[i+1] +=step[i];
    //         step[i+1] %=MOD;
    //     }
    //     if (step[i+2] != -1){
    //         step[i+2] +=step[i];
    //         step[i+2] %=MOD;
    //     }
    // }
    console.log(step[n]);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

