import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    } main {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int n = scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner int m = scanner.nextInt(); m scanner.nextInt() scanner.nextInt scanner boolean[] bool = new boolean[n+1]; bool new boolean[n+1] n+1 n 1 for (int i=0;i<=n;i++){
            bool[i]=true;
        } int i=0; int i=0; i 0 i<=n i n i++ i++ i {
            bool[i]=true;
        } {
            bool[i]=true;
        } bool[i]=true bool[i] bool i true for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            bool[scanner.nextInt()]=false;
        } {
            bool[scanner.nextInt()]=false;
        } bool[scanner.nextInt()]=false bool[scanner.nextInt()] bool scanner.nextInt() scanner.nextInt scanner false int[] b = new int[n+1]; b new int[n+1] n+1 n 1 b[0] = 1 b[0] b 0 1 b[1] = 1 b[1] b 1 1 int mod = 1000000007; mod 1000000007 for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        } {
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        } b[i] = 0 b[i] b i 0 if (bool[i-2])b[i]+=b[i-2]; bool[i-2] bool i-2 i 2 b[i]+=b[i-2] b[i] b i b[i-2] b i-2 i 2 if (bool[i-1])b[i]+=b[i-1]; bool[i-1] bool i-1 i 1 b[i]+=b[i-1] b[i] b i b[i-1] b i-1 i 1 b[i] %= mod b[i] b i mod System.out.println(b[n]) System.out.println System.out System System.out b[n] b n String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        boolean[] bool = new boolean[n+1];
        for (int i=0;i<=n;i++){
            bool[i]=true;
        }
        for (int i=0;i<m;i++){
            bool[scanner.nextInt()]=false;
        }
        int[] b = new int[n+1];
        b[0] = 1;
        b[1] = 1;
        int mod = 1000000007;
        for (int i=2;i<=n;i++){
            b[i] = 0;
            if (bool[i-2])b[i]+=b[i-2];
            if (bool[i-1])b[i]+=b[i-1];
            b[i] %= mod;

        }
        System.out.println(b[n]);
    }
}