Language: C++

#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
#[allow(unused_imports)]
use std::cmp::{min, max};
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let Mod: i64 = 1_000_000_007;
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input!{
        n: usize, m: usize,
        a: [i64; m],
    }
    let mut oks: Vec<bool> = vec!(true; m);
    for i in 0..m{
        oks[a[i] as usize] = false;
    }
    let mut dp = vec!(n as i64 + 1);
    dp[0] = 1;
    for now in 0..n{
        for next in (now + 1)..(min(n + 1, now + 3)){
            if oks[next]{
                dp[next] += dp[now];
                dp[next] %= Mod;
            }
            
        }
    }

    puts!("{}\n", dp[n]);
}
fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #[
    1 | #[allow(unused_imports)]
      |  ^
a.cc:3:2: error: invalid preprocessing directive #[
    3 | #[allow(unused_imports)]
      |  ^
a.cc:5:2: error: invalid preprocessing directive #[
    5 | #[allow(unused_imports)]
      |  ^
a.cc:41:10: error: too many decimal points in number
   41 |         (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~~
a.cc:54:10: error: too many decimal points in number
   54 |         (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
      |          ^~~~~~
a.cc:74:14: error: too many decimal points in number
   74 |     for i in 0..m{
      |              ^~~~
a.cc:79:16: error: too many decimal points in number
   79 |     for now in 0..n{
      |                ^~~~
a.cc:2:1: error: 'use' does not name a type
    2 | use std::cmp::*;
      | ^~~
a.cc:4:1: error: 'use' does not name a type
    4 | use std::collections::*;
      | ^~~
a.cc:6:1: error: 'use' does not name a type
    6 | use std::cmp::{min, max};
      | ^~~
a.cc:7:1: error: 'use' does not name a type
    7 | use std::io::{Write, BufWriter};
      | ^~~
a.cc:9:1: error: 'macro_rules' does not name a type
    9 | macro_rules! input {
      | ^~~~~~~~~~~
a.cc:25:1: error: 'macro_rules' does not name a type
   25 | macro_rules! input_inner {
      | ^~~~~~~~~~~
a.cc:35:1: error: 'macro_rules' does not name a type
   35 | macro_rules! read_value {
      | ^~~~~~~~~~~
a.cc:62:1: error: 'fn' does not name a type
   62 | fn solve() {
      | ^~
a.cc:91:1: error: 'fn' does not name a type
   91 | fn main() {
      | ^~