import java.util.Scanner;

public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[N]);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} import java.util.Scanner; Scanner java.util public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[N]);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} Main private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[N]);
    } solve {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[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 int[] brokenStairs = new int[M]; brokenStairs new int[M] M for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            brokenStairs[i] = sc.nextInt();
        } {
            brokenStairs[i] = sc.nextInt();
        } brokenStairs[i] = sc.nextInt() brokenStairs[i] brokenStairs i sc.nextInt() sc.nextInt sc long[] count = new long[N + 1]; count new long[N + 1] N + 1 N 1 for (int i = 0; i <= N; i++) {
            count[i] = -1;
        } int i = 0; int i = 0; i 0 i <= N i N i++ i++ i {
            count[i] = -1;
        } {
            count[i] = -1;
        } count[i] = -1 count[i] count i -1 1 count[0] = 1 count[0] count 0 1 count[1] = 1 count[1] count 1 1 for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            count[brokenStairs[i]] = 0;
        } {
            count[brokenStairs[i]] = 0;
        } count[brokenStairs[i]] = 0 count[brokenStairs[i]] count brokenStairs[i] brokenStairs i 0 for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        } int stair = 2; int stair = 2; stair 2 stair <= N stair N stair++ stair++ stair {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        } {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        } if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            } count[stair] == -1 count[stair] count stair -1 1 {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            } count[stair] = count[stair - 1] + count[stair - 2] count[stair] count stair count[stair - 1] + count[stair - 2] count[stair - 1] count stair - 1 stair 1 count[stair - 2] count stair - 2 stair 2 count[stair] %= 1000000007 count[stair] count stair 1000000007 System.out.print(count[N]) System.out.print System.out System System.out count[N] count N // Main
    public static void main(String[] args) {
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[N]);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[N]);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

} Main
import java.util.Scanner;

public class Main {

    private void solve() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt(); // 階段の段数
        int M = sc.nextInt(); // 壊れている床番号

        //
        int[] brokenStairs = new int[M];
        for (int i = 0; i < M; i++) {
            brokenStairs[i] = sc.nextInt();
        }

        long[] count = new long[N + 1];
        for (int i = 0; i <= N; i++) {
            count[i] = -1;
        }

        count[0] = 1;
        count[1] = 1;
        for (int i = 0; i < M; i++) {
            count[brokenStairs[i]] = 0;
        }

        for (int stair = 2; stair <= N; stair++) {
            if (count[stair] == -1) {
                count[stair] = count[stair - 1] + count[stair - 2];
                count[stair] %= 1000000007;
            }
        }
        System.out.print(count[N]);
    }

    // Main
    public static void main(String[] args) {
        new Main().solve();
    }

}
