'use strict'

const INF = 900719925474099;
function mapint(temp){
    return temp.split(' ').map((v)=>parseInt(v));
}
const MOD = 1000000007;

function Main(input){
    let temp = input.trim().split('\n');
    let n = mapint(temp[0])[0];
    let m = mapint(temp[0])[1];
    let a = new Array(m);

    let step = new Array(n+10).fill(0);
    step[0] = 1;

    for(let i=1;i<=m;i++){
        step[parseInt(temp[i])] = -1;
    }

    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);
    }

    console.log(step[n]);

}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
