import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    }
} import java.util.PriorityQueue; PriorityQueue java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    }
} Main public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    } main {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    } 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 PriorityQueue<Integer> queue = new PriorityQueue<>(); queue new PriorityQueue<>() for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            queue.add(sc.nextInt());
        } {
            queue.add(sc.nextInt());
        } queue.add(sc.nextInt()) queue.add queue sc.nextInt() sc.nextInt sc long[] dp = new long[n + 2]; dp new long[n + 2] n + 2 n 2 dp[1] = 1 dp[1] dp 1 1 for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        } int i = 2; int i = 2; i 2 i <= n + 1 i n + 1 n 1 i++ i++ i {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        } {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        } if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            } !queue.isEmpty() && queue.peek() == i - 1 !queue.isEmpty() queue.isEmpty() queue.isEmpty queue queue.peek() == i - 1 queue.peek() queue.peek queue i - 1 i 1 {
                queue.poll();
                continue;
            } queue.poll() queue.poll queue continue; dp[i] = dp[i - 1] + dp[i - 2] dp[i] dp i dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 dp[i] %= 1000000007 dp[i] dp i 1000000007 System.out.println(dp[n + 1]) System.out.println System.out System System.out dp[n + 1] dp n + 1 n 1 String[] args args public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    }
} public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    }
} Main
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        // write your code here
        Scanner sc = new Scanner(System.in);

        // abc 129 C
        int n = sc.nextInt();
        int m = sc.nextInt();

        PriorityQueue<Integer> queue = new PriorityQueue<>();

        for (int i = 0; i < m; i++) {
            queue.add(sc.nextInt());
        }

        long[] dp = new long[n + 2];
        dp[1] = 1;
        for (int i = 2; i <= n + 1; i++) {
            if (!queue.isEmpty() && queue.peek() == i - 1) {
                queue.poll();
                continue;
            }
            dp[i] = dp[i - 1] + dp[i - 2];
            dp[i] %= 1000000007;
        }

        System.out.println(dp[n + 1]);
    }
}