import java.io.*;
import java.rmi.MarshalledObject;
import java.util.*;

public class Main {
    static final long MOD = 1000000007;

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    }
}

class Solver {
    final Map<Long, Long> memo = new HashMap<>();

    public long solve(long N, Set<Long> a) {
        return count(0, N, a);
    }

    private long count(long start, long end, Set<Long> a) {
        if (memo.containsKey(start)) {
            return memo.get(start) % Main.MOD;
        }

        if (a.contains(start) || start > end) {
            return 0;
        }
        if (start == end) {
            return 1;
        }

        final long S1 = count(start + 1, end, a) % Main.MOD;
        memo.put(start + 1, S1);

        final long S2 = count(start + 2, end, a) % Main.MOD;
        memo.put(start + 2, S2);

        return (S1 + S2) % Main.MOD;
    }


}
 import java.io.*; io.* java import java.rmi.MarshalledObject; MarshalledObject java.rmi import java.util.*; util.* java public class Main {
    static final long MOD = 1000000007;

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    }
} Main static final long MOD = 1000000007; MOD 1000000007 public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    } main {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N; N N = sc.nextLong() N sc.nextLong() sc.nextLong sc long M; M M = sc.nextLong() M sc.nextLong() sc.nextLong sc Set<Long> a = new HashSet<>(); a new HashSet<>() for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        } int i = 0 ; int i = 0 ; i 0 i < M i M i++ i++ i {
            a.add(sc.nextLong());
        } {
            a.add(sc.nextLong());
        } a.add(sc.nextLong()) a.add a sc.nextLong() sc.nextLong sc final Solver solver = new Solver(); solver new Solver() System.out.println(solver.solve(N, a)) System.out.println System.out System System.out solver.solve(N, a) solver.solve solver N a final String[] args args class Solver {
    final Map<Long, Long> memo = new HashMap<>();

    public long solve(long N, Set<Long> a) {
        return count(0, N, a);
    }

    private long count(long start, long end, Set<Long> a) {
        if (memo.containsKey(start)) {
            return memo.get(start) % Main.MOD;
        }

        if (a.contains(start) || start > end) {
            return 0;
        }
        if (start == end) {
            return 1;
        }

        final long S1 = count(start + 1, end, a) % Main.MOD;
        memo.put(start + 1, S1);

        final long S2 = count(start + 2, end, a) % Main.MOD;
        memo.put(start + 2, S2);

        return (S1 + S2) % Main.MOD;
    }


} Solver final Map<Long, Long> memo = new HashMap<>(); memo new HashMap<>() public long solve(long N, Set<Long> a) {
        return count(0, N, a);
    } solve {
        return count(0, N, a);
    } return count(0, N, a); count(0, N, a) count 0 N a long N N Set<Long> a a private long count(long start, long end, Set<Long> a) {
        if (memo.containsKey(start)) {
            return memo.get(start) % Main.MOD;
        }

        if (a.contains(start) || start > end) {
            return 0;
        }
        if (start == end) {
            return 1;
        }

        final long S1 = count(start + 1, end, a) % Main.MOD;
        memo.put(start + 1, S1);

        final long S2 = count(start + 2, end, a) % Main.MOD;
        memo.put(start + 2, S2);

        return (S1 + S2) % Main.MOD;
    } count {
        if (memo.containsKey(start)) {
            return memo.get(start) % Main.MOD;
        }

        if (a.contains(start) || start > end) {
            return 0;
        }
        if (start == end) {
            return 1;
        }

        final long S1 = count(start + 1, end, a) % Main.MOD;
        memo.put(start + 1, S1);

        final long S2 = count(start + 2, end, a) % Main.MOD;
        memo.put(start + 2, S2);

        return (S1 + S2) % Main.MOD;
    } if (memo.containsKey(start)) {
            return memo.get(start) % Main.MOD;
        } memo.containsKey(start) memo.containsKey memo start {
            return memo.get(start) % Main.MOD;
        } return memo.get(start) % Main.MOD; memo.get(start) % Main.MOD memo.get(start) memo.get memo start Main.MOD Main Main.MOD if (a.contains(start) || start > end) {
            return 0;
        } a.contains(start) || start > end a.contains(start) a.contains a start start > end start end {
            return 0;
        } return 0; 0 if (start == end) {
            return 1;
        } start == end start end {
            return 1;
        } return 1; 1 final long S1 = count(start + 1, end, a) % Main.MOD; S1 count(start + 1, end, a) % Main.MOD count(start + 1, end, a) count start + 1 start 1 end a Main.MOD Main Main.MOD memo.put(start + 1, S1) memo.put memo start + 1 start 1 S1 final long S2 = count(start + 2, end, a) % Main.MOD; S2 count(start + 2, end, a) % Main.MOD count(start + 2, end, a) count start + 2 start 2 end a Main.MOD Main Main.MOD memo.put(start + 2, S2) memo.put memo start + 2 start 2 S2 return (S1 + S2) % Main.MOD; (S1 + S2) % Main.MOD (S1 + S2) S1 S2 Main.MOD Main Main.MOD long start start long end end Set<Long> a a public class Main {
    static final long MOD = 1000000007;

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    }
} public class Main {
    static final long MOD = 1000000007;

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    }
} Main
import java.io.*;
import java.rmi.MarshalledObject;
import java.util.*;

public class Main {
    static final long MOD = 1000000007;

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long M;
        M = sc.nextLong();
        Set<Long> a = new HashSet<>();
        for(int i = 0 ; i < M ; i++){
            a.add(sc.nextLong());
        }

        final Solver solver = new Solver();
        System.out.println(solver.solve(N, a));
    }
}

class Solver {
    final Map<Long, Long> memo = new HashMap<>();

    public long solve(long N, Set<Long> a) {
        return count(0, N, a);
    }

    private long count(long start, long end, Set<Long> a) {
        if (memo.containsKey(start)) {
            return memo.get(start) % Main.MOD;
        }

        if (a.contains(start) || start > end) {
            return 0;
        }
        if (start == end) {
            return 1;
        }

        final long S1 = count(start + 1, end, a) % Main.MOD;
        memo.put(start + 1, S1);

        final long S2 = count(start + 2, end, a) % Main.MOD;
        memo.put(start + 2, S2);

        return (S1 + S2) % Main.MOD;
    }


}

