import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        int N;
        int M;
        boolean[] a;
        int mod = (int) (1e9 + 7);

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        int N;
        int M;
        boolean[] a;
        int mod = (int) (1e9 + 7);

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) C solver = new C(); solver new C() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class C {
        int N;
        int M;
        boolean[] a;
        int mod = (int) (1e9 + 7);

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        }

    } C int N; N int M; M boolean[] a; a int mod = (int) (1e9 + 7); mod (int) (1e9 + 7) 1e9 7 public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        } solve {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        } N = in.nextInt() N in.nextInt() in.nextInt in M = in.nextInt() M in.nextInt() in.nextInt in a = new boolean[N + 1] a new boolean[N + 1] N + 1 N 1 Arrays.fill(a, true) Arrays.fill Arrays a true for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                a[in.nextInt()] = false;
            } {
                a[in.nextInt()] = false;
            } a[in.nextInt()] = false a[in.nextInt()] a in.nextInt() in.nextInt in false int[] dp = new int[N + 1]; dp new int[N + 1] N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            } {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            } if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                } a[i] a i {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                } dp[i] = dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    } i - 2 >= 0 i - 2 i 2 0 {
                        dp[i] += dp[i - 2];
                    } dp[i] += dp[i - 2] dp[i] dp i dp[i - 2] dp i - 2 i 2 dp[i] %= mod dp[i] dp i mod out.println(dp[N]) out.println out dp[N] dp N int testNumber testNumber Scanner in in PrintWriter out out public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        int N;
        int M;
        boolean[] a;
        int mod = (int) (1e9 + 7);

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        int N;
        int M;
        boolean[] a;
        int mod = (int) (1e9 + 7);

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        int N;
        int M;
        boolean[] a;
        int mod = (int) (1e9 + 7);

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            N = in.nextInt();
            M = in.nextInt();
            a = new boolean[N + 1];
            Arrays.fill(a, true);
            for (int i = 0; i < M; i++) {
                a[in.nextInt()] = false;
            }

            int[] dp = new int[N + 1];
            dp[0] = 1;
            for (int i = 1; i <= N; i++) {
                if (a[i]) {
                    dp[i] = dp[i - 1];
                    if (i - 2 >= 0) {
                        dp[i] += dp[i - 2];
                    }
                    dp[i] %= mod;
                }
            }
            out.println(dp[N]);
        }

    }
}

