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

public class Main {

    long MOD = (long)1e9 + 7;

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        System.out.println(dp[n]);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    long MOD = (long)1e9 + 7;

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        System.out.println(dp[n]);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main long MOD = (long)1e9 + 7; MOD (long)1e9 + 7 (long)1e9 7 void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        System.out.println(dp[n]);
    } run {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        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 m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] ng = new int[m]; ng new int[m] m for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            ng[i] = sc.nextInt();
        } {
            ng[i] = sc.nextInt();
        } ng[i] = sc.nextInt() ng[i] ng i sc.nextInt() sc.nextInt sc long[] dp = new long[n + 1]; dp new long[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 int p; p if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        } m != 0 m 0 {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } dp[1] = ng[0] == 1 ? 0 : 1 dp[1] dp 1 ng[0] == 1 ? 0 : 1 ng[0] == 1 ng[0] ng 0 1 0 1 p = ng[0] == 1 ? 1 : 0 p ng[0] == 1 ? 1 : 0 ng[0] == 1 ng[0] ng 0 1 1 0 {
            dp[1] = 1;
            p = 0;
        } dp[1] = 1 dp[1] dp 1 1 p = 0 p 0 for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        } {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        } if (p < m && ng[p] == i) {
                p++;
                continue;
            } p < m && ng[p] == i p < m p m ng[p] == i ng[p] ng p i {
                p++;
                continue;
            } p++ p continue; dp[i] = (dp[i - 1] + dp[i - 2]) % MOD dp[i] dp i (dp[i - 1] + dp[i - 2]) % MOD (dp[i - 1] + dp[i - 2]) dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 MOD System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    } debug {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object...os os public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {

    long MOD = (long)1e9 + 7;

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        System.out.println(dp[n]);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

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

    long MOD = (long)1e9 + 7;

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        System.out.println(dp[n]);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

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

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

public class Main {

    long MOD = (long)1e9 + 7;

    void run() {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), m = sc.nextInt();

        int[] ng = new int[m];
        for (int i = 0; i < m; i++) {
            ng[i] = sc.nextInt();
        }

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

        int p;
        if (m != 0) {
            dp[1] = ng[0] == 1 ? 0 : 1;
            p = ng[0] == 1 ? 1 : 0;
        } else {
            dp[1] = 1;
            p = 0;
        }

        for (int i = 2; i <= n; i++) {
            if (p < m && ng[p] == i) {
                p++;
                continue;
            }
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
        }
//        debug(dp);
        System.out.println(dp[n]);
    }

    void debug(Object...os) {
        System.err.println(Arrays.deepToString(os));
    }

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