import java.io.*;
import java.util.*;

public class Main {


    private  static void solver(InputReader sc, PrintWriter out) throws Exception {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    }
    private  static long gcd(long a, long b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    }

    public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    }
}
class Pair implements Comparable<Pair>{
    int x;
    String s;
    Pair(int x, String s){
        this.x = x;
        this.s = s;
    }
    public int compareTo(Pair p){
        return this.x-p.x;
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {


    private  static void solver(InputReader sc, PrintWriter out) throws Exception {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    }
    private  static long gcd(long a, long b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    }

    public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    }
} Main private  static void solver(InputReader sc, PrintWriter out) throws Exception {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    } solver {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc Set<Integer> hs = new HashSet<>(); hs new HashSet<>() for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            } int i=0 ; int i=0 ; i 0 i<m i m i++ i++ i {
                hs.add(sc.nextInt());
            } {
                hs.add(sc.nextInt());
            } hs.add(sc.nextInt()) hs.add hs sc.nextInt() sc.nextInt sc long dp[] = new long[n+1]; dp new long[n+1] n+1 n 1 long mod = 1000000007; mod 1000000007 if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1; hs.contains(0) hs.contains hs 0 dp[0] = 0 dp[0] dp 0 0 dp[0] = 1 dp[0] dp 0 1 if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1; hs.contains(1) hs.contains hs 1 dp[1] = 0 dp[1] dp 1 0 dp[1] = 1 dp[1] dp 1 1 for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            } int i=2; int i=2; i 2 i<=n i n i++ i++ i {
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            } {
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            } if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                } hs.contains(i) hs.contains hs i {
                    dp[i] = 0;
                } dp[i] = 0 dp[i] dp i 0 {
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                } dp[i] = (dp[i-1]+dp[i-2])%mod dp[i] dp i (dp[i-1]+dp[i-2])%mod (dp[i-1]+dp[i-2]) dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 mod out.println(dp[n]%mod) out.println out dp[n]%mod dp[n] dp n mod InputReader sc sc PrintWriter out out private  static long gcd(long a, long b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    } gcd {
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    } if(b==0)
            return a;
        else
            return gcd(b,a%b); b==0 b 0 return a; a return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b long a a long b b public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) solver(in,out) solver in out out.close() out.close out String[] args args static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    } InputReader public BufferedReader reader; reader public StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream), 32768) reader new BufferedReader(new InputStreamReader(stream), 32768) tokenizer = null tokenizer null InputStream stream stream public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong(){
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        } readLongArr {
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        } long arr[] = new long[n]; arr new long[n] n for(int i=0; i<n; i++){
                arr[i] = nextLong();
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                arr[i] = nextLong();
            } {
                arr[i] = nextLong();
            } arr[i] = nextLong() arr[i] arr i nextLong() nextLong return arr; arr int n n public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        } readIntArr {
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        } int arr[] = new int[n]; arr new int[n] n for(int i=0; i<n; i++){
                arr[i] = nextInt();
            } int i=0; int i=0; i 0 i<n i n i++ i++ i {
                arr[i] = nextInt();
            } {
                arr[i] = nextInt();
            } arr[i] = nextInt() arr[i] arr i nextInt() nextInt return arr; arr int n n class Pair implements Comparable<Pair>{
    int x;
    String s;
    Pair(int x, String s){
        this.x = x;
        this.s = s;
    }
    public int compareTo(Pair p){
        return this.x-p.x;
    }
} Pair int x; x String s; s Pair(int x, String s){
        this.x = x;
        this.s = s;
    } Pair {
        this.x = x;
        this.s = s;
    } this.x = x this.x this this.x x this.s = s this.s this this.s s int x x String s s public int compareTo(Pair p){
        return this.x-p.x;
    } compareTo {
        return this.x-p.x;
    } return this.x-p.x; this.x-p.x this.x this this.x p.x p p.x Pair p p Comparable public class Main {


    private  static void solver(InputReader sc, PrintWriter out) throws Exception {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    }
    private  static long gcd(long a, long b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    }

    public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    }
} public class Main {


    private  static void solver(InputReader sc, PrintWriter out) throws Exception {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    }
    private  static long gcd(long a, long b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    }

    public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    }
} Main
import java.io.*;
import java.util.*;

public class Main {


    private  static void solver(InputReader sc, PrintWriter out) throws Exception {
            int n = sc.nextInt();
            int m = sc.nextInt();
            Set<Integer> hs = new HashSet<>();
            for(int i=0 ;i<m; i++){
                hs.add(sc.nextInt());
            }
            long dp[] = new long[n+1];
            long mod = 1000000007;
           if(hs.contains(0))
               dp[0] = 0;
           else
               dp[0] = 1;
           if(hs.contains(1))
               dp[1] = 0;
           else
               dp[1] = 1;
            for(int i=2;i<=n;i++){
                if(hs.contains(i)){
                    dp[i] = 0;
                }
                else{
                    dp[i] = (dp[i-1]+dp[i-2])%mod;
                }
            }
           /* for(int x : dp)
                out.print(x+"->");*/
            out.println(dp[n]%mod);
    }
    private  static long gcd(long a, long b){
        if(b==0)
            return a;
        else
            return gcd(b,a%b);
    }

    public static void main(String[] args) throws Exception{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solver(in,out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong(){
            return Long.parseLong(next());
        }

        public long[] readLongArr(int n){
            long arr[] = new long[n];
            for(int i=0; i<n; i++){
                arr[i] = nextLong();
            }
            return arr;
        }
        public int[] readIntArr(int n){
            int arr[] = new int[n];
            for(int i=0; i<n; i++){
                arr[i] = nextInt();
            }
            return arr;
        }
    }
}
class Pair implements Comparable<Pair>{
    int x;
    String s;
    Pair(int x, String s){
        this.x = x;
        this.s = s;
    }
    public int compareTo(Pair p){
        return this.x-p.x;
    }
}