
macro_rules! fn_memo{
    ($fun:ident : $memo:ident ( $($param:ident : usize),* ) -> $out:ty $body:block) => {
        fn $fun($memo:&mut fn_memo!($out; $($param),*), $($param : usize),*) -> $out $body
    };
    ($fun:ident : $memo:ident ( $($eparam:ident : $epty:ty),* ; $($param:ident : usize),* ) -> $out:ty $body:block) => {
        fn $fun($memo:&mut fn_memo!($out; $($param),*), $($eparam:$epty),* , $($param : usize),*) -> $out $body
    };
    ($out:ty; $param:ident) => {
        Vec<Option<$out>>
    };
    ($out:ty; $param:ident, $($p:ident),*) => {
        Vec<fn_vec!($out; $($p),*)>
    };
}
macro_rules! memo{
    ($fun:ident : $memo:ident ( $($marg:expr),* ) -> $out:ty) => {
        let mut $memo = &mut memo!($out; $($marg),*);
    };
    ($out:ty; $marg:expr) => {
        vec![None as Option<$out>; $marg]
    };
    ($out:ty; $marg:expr, $(m:expr),*) => {
        vec![memo!($out; $($m),*); $marg]
    };
}
macro_rules! get{
    ($fun:ident : $memo:ident ( $($arg:expr),* )) => {{
        if $memo$([$arg])*.is_none() {
            $memo$([$arg])* = Some($fun($memo, $($arg),*));
        }
        $memo$([$arg])*.unwrap()
    }};
    ($fun:ident : $memo:ident ( $($earg:expr),* ; $($arg:expr),* )) => {{
        if $memo$([$arg])*.is_none() {
            $memo$([$arg])* = Some($fun($memo, $($earg),* , $($arg),*));
        }
        $memo$([$arg])*.unwrap()
    }};
}

fn main(){
    let mut buf = String::new();
    use std::io::Read;
    std::io::stdin().read_to_string(&mut buf);
    let mut sw = buf.split_whitespace();
    
    let n: usize = sw.next().unwrap().parse().ok().unwrap();
    let m: usize = sw.next().unwrap().parse().ok().unwrap();
    let mut broken = vec![false; n+1];
    for _ in 0..m {
        let a:usize = sw.next().unwrap().parse().ok().unwrap();
        broken[a] = true;
    }
    let broken = broken;
    
    memo!{ solve:sm(100_001) -> u64 };
    println!("{}", get!{ solve:sm( &broken; n ) });
}

fn_memo!{ solve:sm( broken: &Vec<bool>; n:usize ) -> u64 {
    if broken[n] {
        0
    } else if n <= 1 { 
        1
    } else {
        ((get!{solve:sm(broken; n-1)}) + (get!{solve:sm(broken; n-2)})) % 1_000_000_007
    }
}}

