import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    }
} Main public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    } main {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    } final Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) final String[] str = scanner.nextLine().split(" "); str scanner.nextLine().split(" ") scanner.nextLine().split scanner.nextLine() scanner.nextLine scanner " " final int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 final int m = Integer.parseInt(str[1]); m Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 final int[] breaks = new int[m]; breaks new int[m] m for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        } {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        } breaks[i] = Integer.parseInt(scanner.nextLine()) breaks[i] breaks i Integer.parseInt(scanner.nextLine()) Integer.parseInt Integer scanner.nextLine() scanner.nextLine scanner final Long[] counts = new Long[n]; counts new Long[n] n for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        } int i = 0; int i = 0; i 0 i < breaks.length i breaks.length breaks breaks.length i++ i++ i {
            counts[breaks[i] - 1] = 0L;
        } {
            counts[breaks[i] - 1] = 0L;
        } counts[breaks[i] - 1] = 0L counts[breaks[i] - 1] counts breaks[i] - 1 breaks[i] breaks i 1 0L if (counts[0] == null) counts[0] = 1L; counts[0] == null counts[0] counts 0 null counts[0] = 1L counts[0] counts 0 1L if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        } counts.length == 1 counts.length counts counts.length 1 {
            System.out.println(counts[0]);
            return;
        } System.out.println(counts[0]) System.out.println System.out System System.out counts[0] counts 0 return; if (counts[1] == null) counts[1] = 1L + counts[0]; counts[1] == null counts[1] counts 1 null counts[1] = 1L + counts[0] counts[1] counts 1 1L + counts[0] 1L counts[0] counts 0 for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        } int i = 2; int i = 2; i 2 i < counts.length i counts.length counts counts.length i++ i++ i {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        } {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        } if (counts[i] != null) continue; counts[i] != null counts[i] counts i null continue; counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L counts[i] counts i (counts[i - 1] + counts[i - 2]) % 1000000007L (counts[i - 1] + counts[i - 2]) counts[i - 1] counts i - 1 i 1 counts[i - 2] counts i - 2 i 2 1000000007L System.out.println(counts[counts.length - 1]) System.out.println System.out System System.out counts[counts.length - 1] counts counts.length - 1 counts.length counts counts.length 1 String[] args args public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    }
} public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);

        final String[] str = scanner.nextLine().split(" ");
        final int n = Integer.parseInt(str[0]);
        final int m = Integer.parseInt(str[1]);

        final int[] breaks = new int[m];
        for (int i = 0; i < m; i++) {
            breaks[i] = Integer.parseInt(scanner.nextLine());
        }

        final Long[] counts = new Long[n];
        for (int i = 0; i < breaks.length; i++) {
            counts[breaks[i] - 1] = 0L;
        }

        if (counts[0] == null) counts[0] = 1L;
        if (counts.length == 1) {
            System.out.println(counts[0]);
            return;
        }

        if (counts[1] == null) counts[1] = 1L + counts[0];
        for (int i = 2; i < counts.length; i++) {
            if (counts[i] != null) continue;
            counts[i] = (counts[i - 1] + counts[i - 2]) % 1000000007L;
        }

        System.out.println(counts[counts.length - 1]);

    }
}