import java.util.Scanner;

public class Main {
    public static int from = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

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

    public static boolean isBroken(int[] broken, int step, int from) {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static int from = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

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

    public static boolean isBroken(int[] broken, int step, int from) {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    }
} Main public static int from = 0; from 0 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

        System.out.println(dp[steps]);
    } main {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

        System.out.println(dp[steps]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int steps = sc.nextInt(); steps sc.nextInt() sc.nextInt sc long[] dp = new long[steps + 1]; dp new long[steps + 1] steps + 1 steps 1 int breaks = sc.nextInt(); breaks sc.nextInt() sc.nextInt sc int[] br = new int[breaks]; br new int[breaks] breaks for (int i = 0; i < breaks; i++) {
            br[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < breaks i breaks i++ i++ i {
            br[i] = sc.nextInt();
        } {
            br[i] = sc.nextInt();
        } br[i] = sc.nextInt() br[i] br i sc.nextInt() sc.nextInt sc dp[0] = 1 dp[0] dp 0 1 if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        } isBroken(br, 1, from) isBroken br 1 from {
            dp[1] = 0;
            from = 1;
        } dp[1] = 0 dp[1] dp 1 0 from = 1 from 1 {
            dp[1] = 1;
        } dp[1] = 1 dp[1] dp 1 1 int mod = 1000000007; mod 1000000007 for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        } int step = 2; int step = 2; step 2 step <= steps step steps step++ step++ step {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        } {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        } dp[step] = 0 dp[step] dp step 0 if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            } !isBroken(br, step, from) isBroken(br, step, from) isBroken br step from {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            } dp[step] = (dp[step - 1] + dp[step - 2]) % mod dp[step] dp step (dp[step - 1] + dp[step - 2]) % mod (dp[step - 1] + dp[step - 2]) dp[step - 1] dp step - 1 step 1 dp[step - 2] dp step - 2 step 2 mod System.out.println(dp[steps]) System.out.println System.out System System.out dp[steps] dp steps String[] args args public static boolean isBroken(int[] broken, int step, int from) {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    } isBroken {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    } for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        } int i = from; int i = from; i from i < broken.length i broken.length broken broken.length i++ i++ i {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        } {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        } if (broken[i] == step) {
                Main.from = i;
                return true;
            } broken[i] == step broken[i] broken i step {
                Main.from = i;
                return true;
            } Main.from = i Main.from Main Main.from i return true; true return false; false int[] broken broken int step step int from from public class Main {
    public static int from = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

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

    public static boolean isBroken(int[] broken, int step, int from) {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    }
} public class Main {
    public static int from = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

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

    public static boolean isBroken(int[] broken, int step, int from) {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    }
} Main
import java.util.Scanner;

public class Main {
    public static int from = 0;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int steps = sc.nextInt();
        long[] dp = new long[steps + 1];

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


        dp[0] = 1;
        if (isBroken(br, 1, from) ) {
            dp[1] = 0;
            from = 1;
        } else {
            dp[1] = 1;
        }

        int mod = 1000000007;
        for (int step = 2; step <= steps; step++) {
            dp[step] = 0;
            if (!isBroken(br, step, from)) {
                dp[step] = (dp[step - 1] + dp[step - 2]) % mod;
            }
        }

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

    public static boolean isBroken(int[] broken, int step, int from) {
        for (int i = from; i < broken.length; i++) {
            if (broken[i] == step) {
                Main.from = i;
                return true;
            }
        }
        return false;
    }
}