import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    } 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 long[] brokens = new long[n+1]; brokens new long[n+1] n+1 n 1 long[] ins = new long[n+1]; ins new long[n+1] n+1 n 1 for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            brokens[sc.nextInt()] = 1;
        } {
            brokens[sc.nextInt()] = 1;
        } brokens[sc.nextInt()] = 1 brokens[sc.nextInt()] brokens sc.nextInt() sc.nextInt sc 1 for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        } int i = 1; int i = 1; i 1 i < n + 1 i n + 1 n 1 i++ i++ i {
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        } {
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        } if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            } brokens[i] == 1 brokens[i] brokens i 1 {
                ins[i] = 0;
            } ins[i] = 0 ins[i] ins i 0 if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            } i == 1 i 1 {
                ins[i] = 1;
            } ins[i] = 1 ins[i] ins i 1 if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            } i == 2 i 2 {
                ins[i] = ins[i - 1] + 1;
            } ins[i] = ins[i - 1] + 1 ins[i] ins i ins[i - 1] + 1 ins[i - 1] ins i - 1 i 1 1 {
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            } ins[i] = ins[i - 1] + ins[i - 2] ins[i] ins i ins[i - 1] + ins[i - 2] ins[i - 1] ins i - 1 i 1 ins[i - 2] ins i - 2 i 2 ins[i] = ins[i] % 1000000007 ins[i] ins i ins[i] % 1000000007 ins[i] ins i 1000000007 System.out.println(ins[n]) System.out.println System.out System System.out ins[n] ins n String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] brokens = new long[n+1];
        long[] ins = new long[n+1];
        for(int i = 0;i < m;i++){
            brokens[sc.nextInt()] = 1;
        }
        for(int i = 1;i < n + 1;i++){
            if(brokens[i] == 1){
                ins[i] = 0;
            }else if(i == 1){
                ins[i] = 1;
            }else if(i == 2){
                ins[i] = ins[i - 1] + 1;
            }else{
                ins[i] = ins[i - 1] + ins[i - 2];
                ins[i] = ins[i] % 1000000007;
            }
        }
        System.out.println(ins[n]);
    }
}