use std::cmp::*;
use std::collections::*;
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let MOD: i64 = 1000000007;
    let n:usize = read();
    let m:usize = read();
    let mut dp:Vec<i64> = vec![0;n + 1];
    for i in 0..m{
        let a:usize = read();
        dp[a] = -1;
    }
    dp[0] = 1;
    for i in 1..n + 1{
       if dp[i] != -1 && dp[i - 1] != -1 {
           dp[i] += dp[i - 1];
           dp[i] %= MOD;
       }
           if i > 1  && dp[i] != -1 && dp[i - 2] != -1{
               dp[i] += dp[i - 2];
               dp[i] %= MOD;
           }
    }
    println!("{:?}",dp);
    println!("{}",dp[n]);
}