import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    } try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        } {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int M = in.nextInt(); M in.nextInt() in.nextInt in int[] a = new int[M]; a new int[M] M for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                a[i] = in.nextInt();
            } {
                a[i] = in.nextInt();
            } a[i] = in.nextInt() a[i] a i in.nextInt() in.nextInt in final long mod = 1000000007; mod 1000000007 boolean[] isBroken = new boolean[N + 1 + 2]; isBroken new boolean[N + 1 + 2] N + 1 + 2 N + 1 + 2 N 1 2 for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                isBroken[a[i]] = true;
            } {
                isBroken[a[i]] = true;
            } isBroken[a[i]] = true isBroken[a[i]] isBroken a[i] a i true isBroken[N + 1] = true isBroken[N + 1] isBroken N + 1 N 1 true isBroken[N + 2] = true isBroken[N + 2] isBroken N + 2 N 2 true long[] stair = new long[N + 1]; stair new long[N + 1] N + 1 N 1 stair[0] = 1 stair[0] stair 0 1 for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            } int i = 0; int i = 0; i 0 i < N + 1 i N + 1 N 1 i++ i++ i {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            } {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            } if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                } !isBroken[i + 1] isBroken[i + 1] isBroken i + 1 i 1 {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                } stair[i + 1] += stair[i] stair[i + 1] stair i + 1 i 1 stair[i] stair i stair[i + 1] %= mod stair[i + 1] stair i + 1 i 1 mod if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                } !isBroken[i + 2] isBroken[i + 2] isBroken i + 2 i 2 {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                } stair[i + 2] += stair[i] stair[i + 2] stair i + 2 i 2 stair[i] stair i stair[i + 2] %= mod stair[i + 2] stair i + 2 i 2 mod System.out.println(stair[N]) System.out.println System.out System System.out stair[N] stair N String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int M = in.nextInt();
            int[] a = new int[M];
            for (int i = 0; i < M; i++) {
                a[i] = in.nextInt();
            }
            final long mod = 1000000007;

            boolean[] isBroken = new boolean[N + 1 + 2];
            for (int i = 0; i < M; i++) {
                isBroken[a[i]] = true;
            }
            isBroken[N + 1] = true;
            isBroken[N + 2] = true;

            long[] stair = new long[N + 1];
            stair[0] = 1;
            for (int i = 0; i < N + 1; i++) {
                if (!isBroken[i + 1]) {
                    stair[i + 1] += stair[i];
                    stair[i + 1] %= mod;
                }
                if (!isBroken[i + 2]) {
                    stair[i + 2] += stair[i];
                    stair[i + 2] %= mod;
                }
            }
            System.out.println(stair[N]);
        }
    }
}
