use std::io;
use std::io::BufRead;

fn main() {
    let stdin = io::stdin();
    let mut stdin = stdin.lock();
    
    let (n,m) = {
        let mut s = String::new();
        stdin.read_line(&mut s).unwrap();
        let mut s = s.trim().split_whitespace();
        (
            s.next().unwrap().parse::<usize>().unwrap(),
            s.next().unwrap().parse::<usize>().unwrap(),
        )
    };

    let a: Vec<usize> = {
        let mut a = Vec::new();
        for _ in 0..m {
            let mut s = String::new();
            stdin.read_line(&mut s).unwrap();
            a.push(
                s.trim().parse::<usize>().unwrap()
            );
        }
        a
    };

    
    let mut step: Vec<i32> = if a[0] == 1 {
        vec![ 1, 0 ]
    } else {
        vec![ 1, 1 ]
    };
    
    for i in 2..n+1 {
        if a.contains(&i) {
            step.push( 0 );
        } else {
            step.push( step[i-2] + step[i-1] );
        }

        if step[i] > 1_000_000_007 {
            step[i] = step[i] % 1_000_000_007;
        }
    }
    
    println!("{}", step[n] );
}
