import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc long mod = 1000000000 + 7; mod 1000000000 + 7 1000000000 7 int[] a = new int[M]; a new int[M] M boolean[] floors = new boolean[N + 1]; floors new boolean[N + 1] N + 1 N 1 Arrays.fill(floors, true) Arrays.fill Arrays floors true for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        } {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc floors[a[i]] = false floors[a[i]] floors a[i] a i false long[] dp = new long[N + 1]; dp new long[N + 1] N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        } int now = 0; int now = 0; now 0 now < N now N now++ now++ now {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        } {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        } if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            } floors[now + 1] floors now + 1 now 1 {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            } dp[now + 1] += dp[now] dp[now + 1] dp now + 1 now 1 dp[now] dp now dp[now + 1] %= mod dp[now + 1] dp now + 1 now 1 mod if (now == N - 1) {
                break;
            } now == N - 1 now N - 1 N 1 {
                break;
            } break; if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            } floors[now + 2] floors now + 2 now 2 {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            } dp[now + 2] += dp[now] dp[now + 2] dp now + 2 now 2 dp[now] dp now dp[now + 2] %= mod dp[now + 2] dp now + 2 now 2 mod System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long mod = 1000000000 + 7;
        int[] a = new int[M];
        boolean[] floors = new boolean[N + 1];
        Arrays.fill(floors, true);
        for (int i = 0; i < M; i++) {
            a[i] = sc.nextInt();
            floors[a[i]] = false;
        }

        long[] dp = new long[N + 1];
        dp[0] = 1;

        for (int now = 0; now < N; now++) {
            if (floors[now + 1]) {
                dp[now + 1] += dp[now];
                dp[now + 1] %= mod;
            }

            if (now == N - 1) {
                break;
            }

            if (floors[now + 2]) {
                dp[now + 2] += dp[now];
                dp[now + 2] %= mod;
            }
        }

        System.out.println(dp[N]);
    }
}