import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    } main {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    } Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in))); scan new Scanner(new BufferedReader(new InputStreamReader(System.in))) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan HashSet<Integer> bad = new HashSet<>(); bad new HashSet<>() for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            bad.add(scan.nextInt());
        } {
            bad.add(scan.nextInt());
        } bad.add(scan.nextInt()) bad.add bad scan.nextInt() scan.nextInt scan long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 dp[0] = 1 dp[0] dp 0 1 for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        } {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        } if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            } bad.contains(i) bad.contains bad i {
                dp[i] = 0;
                continue;
            } dp[i] = 0 dp[i] dp i 0 continue; if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            } 2 <= i 2 i {
                dp[i] = dp[i - 2] + dp[i - 1];
            } dp[i] = dp[i - 2] + dp[i - 1] dp[i] dp i dp[i - 2] + dp[i - 1] dp[i - 2] dp i - 2 i 2 dp[i - 1] dp i - 1 i 1 if (i == 1) {
                dp[i] = dp[i - 1];
            } i == 1 i 1 {
                dp[i] = dp[i - 1];
            } dp[i] = dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 dp[i] = dp[i] % 1000000007 dp[i] dp i dp[i] % 1000000007 dp[i] dp i 1000000007 long answer = dp[N]; answer dp[N] dp N System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        HashSet<Integer> bad = new HashSet<>();
        for (int i = 0; i < M; i++) {
            bad.add(scan.nextInt());
        }
        long[] dp = new long[N+1];
        dp[0] = 1;
        for (int i = 1; i <= N; i++) {
            if (bad.contains(i)) {
                dp[i] = 0;
                continue;
            }
            if (2 <= i) {
                dp[i] = dp[i - 2] + dp[i - 1];
            } else if (i == 1) {
                dp[i] = dp[i - 1];
            }
            dp[i] = dp[i] % 1000000007;
        }
        long answer = dp[N];
        System.out.println(answer);
    }
}
