#![feature(drop_types_in_const)]

macro_rules! fn_memo {
    ( $fun:ident : $MEMO:ident ($($p:ident:$t:ty),*; $($param:ident < $sup:expr),*) -> $out:ty $body:block ) => {
        static mut $MEMO: Option<memo_type!($out;$($sup),*)> = None;
        fn $fun($($p:$t),*,$($param:usize),*) -> $out {
            unsafe {
                if let Some(ref memo) = $MEMO {
                    if let Some(val) = memo $([$param])* { return val; }
                } else { $MEMO = Some(memo_vec!($($sup),*)); }
            }
            let val = $body;
            unsafe {
                if let Some(ref mut memo) = $MEMO { memo $([$param])* = Some(val);}
            }
            val
        }
    }
}
macro_rules! memo_type {
    ( $out:ty; $sup:expr ) => { Vec<Option<$out>> };
    ( $out:ty; $sup:expr, $($s:expr),*) => { Vec<memo_type!($out; $($s)*)> }
}
macro_rules! memo_vec {
    ( $sup:expr ) => { vec![None; $sup] };
    ( $sup:expr, $($s:expr),* ) => { vec![memo_vec!($($s),*); $sup]}
}

#[test]
fn test_solve() {
   //assert_eq!(solve("6 1\n3\n"), "4\n");
   //assert_eq!(solve("10 2\n4\n5\n"), "0\n");
   assert_eq!(solve("100 5\n1\n23\n45\n67\n89\n"), "608200469\n");
}

fn solve(src: &str) -> String {
    let mut sc = Scanner::from_str(src);

    let n: usize = sc.read();
    let m: usize = sc.read();
    let broken = {
        let mut broken: Vec<bool> = vec![false; n+1];
        for _ in 0..m {
            let a: usize = sc.read();
            broken[a] = true;
        }
        broken
    };

    format!("{}\n", num(&broken, n))
}

fn_memo! { num:NUM( broken:&Vec<bool>; n < 100_000 ) -> Finite {
    if n == 0 { return Finite(1) }
    if broken[n] { return Finite(0) }
    let val = num(broken, n-1) + if n != 1 { num(broken, n-2) } else { Finite(0) };
    val
}}
fn main() {
    let mut buf = String::new();
    use std::io::Read;
    std::io::stdin().read_to_string(&mut buf).unwrap();
    use std::io::Write;
    std::io::stdout().write_all(solve(&buf).as_bytes()).unwrap();
}
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
struct Finite(u64);
const MOD: u64 = 1_000_000_007;
impl Finite {
    pub fn pow(self, mut exp: u32) -> Self {
        let mut base = self.0;
        let mut acc = 1;
        while exp > 1 {
            if (exp & 1) == 1 {
                acc = acc * base % MOD;
            }
            exp /= 2;
            base = base * base % MOD;
        }
        if exp == 1 {
            acc = acc * base % MOD;
        }
        Finite(acc)
    }
}
impl std::fmt::Display for Finite {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        write!(f, "{}", self.0)
    }
}
impl std::ops::Neg for Finite {
    type Output = Self;
    fn neg(self) -> Self {
        Finite(0) - self
    }
}
impl std::ops::Add for Finite {
    type Output = Self;
    fn add(self, rhs: Self) -> Self {
        Finite((self.0 + rhs.0) % MOD)
    }
}
impl std::ops::AddAssign for Finite {
    fn add_assign(&mut self, rhs: Self) {
        *self = *self + rhs;
    }
}
impl std::ops::Sub for Finite {
    type Output = Self;
    fn sub(self, rhs: Self) -> Self {
        Finite((self.0 + MOD - rhs.0) % MOD)
    }
}
impl std::ops::SubAssign for Finite {
    fn sub_assign(&mut self, rhs: Self) {
        *self = *self - rhs;
    }
}
impl std::ops::Mul for Finite {
    type Output = Self;
    fn mul(self, rhs: Self) -> Self {
        Finite(self.0 * rhs.0 % MOD)
    }
}
impl std::ops::MulAssign for Finite {
    fn mul_assign(&mut self, rhs: Self) {
        *self = *self * rhs;
    }
}
impl std::ops::Div for Finite {
    type Output = Self;
    fn div(self, rhs: Self) -> Self {
        self * rhs.pow((MOD - 2) as u32)
    }
}
impl std::ops::DivAssign for Finite {
    fn div_assign(&mut self, rhs: Self) {
        *self = *self / rhs;
    }
}
impl std::iter::Sum<Finite> for Finite {
    fn sum<I: Iterator<Item = Finite>>(iter: I) -> Finite {
        iter.fold(Finite(0), |a, b| a + b)
    }
}
impl<'a> std::iter::Sum<&'a Finite> for Finite {
    fn sum<I: Iterator<Item = &'a Finite>>(iter: I) -> Finite {
        iter.fold(Finite(0), |a, b| a + *b)
    }
}
impl std::iter::Product<Finite> for Finite {
    fn product<I: Iterator<Item = Finite>>(iter: I) -> Finite {
        iter.fold(Finite(1), |a, b| a * b)
    }
}
impl<'a> std::iter::Product<&'a Finite> for Finite {
    fn product<I: Iterator<Item = &'a Finite>>(iter: I) -> Finite {
        iter.fold(Finite(1), |a, b| a * *b)
    }
}
struct Scanner<I> {
    src: I,
}
impl<'a> Scanner<std::str::SplitWhitespace<'a>> {
    fn from_str(src: &'a str) -> Self {
        Scanner {
            src: src.split_whitespace(),
        }
    }
}
#[allow(dead_code)]
impl<'a, I> Scanner<I>
where
    I: std::iter::Iterator<Item = &'a str>,
{
    fn read<T: std::str::FromStr>(&mut self) -> T {
        self.src.next().unwrap().parse().ok().expect("Parse error")
    }
    fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    fn chars(&mut self) -> Vec<char> {
        self.src.next().unwrap().chars().collect()
    }
}