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


public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    }

}

class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

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

    public Integer nextInt() {
        return Integer.valueOf(next());
    }
    public Long nextLong() {return  Long.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    }

} Main public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    } 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) InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream); out new InputReader.OutputWriter(outputStream) int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in int mod = 1_000_000_000 + 7; mod 1_000_000_000 + 7 1_000_000_000 7 int [] a = new int[n]; a new int[n] n for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            a[in.nextInt() - 1] = 1;
        } {
            a[in.nextInt() - 1] = 1;
        } a[in.nextInt() - 1] = 1 a[in.nextInt() - 1] a in.nextInt() - 1 in.nextInt() in.nextInt in 1 1 if(n == 1) {
            out.println(1);
            out.flush();
            return;
        } n == 1 n 1 {
            out.println(1);
            out.flush();
            return;
        } out.println(1) out.println out 1 out.flush() out.flush out return; int [] dp = new int[n]; dp new int[n] n if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        } a[0] == 1 a[0] a 0 1 {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        } if(a[1] != 1) {
                dp[1] = 1;
            } a[1] != 1 a[1] a 1 1 {
                dp[1] = 1;
            } dp[1] = 1 dp[1] dp 1 1 {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        } if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            } a[1] == 1 a[1] a 1 1 dp[1] = 0 dp[1] dp 1 0 {
                dp[0] = 1;
                dp[1] = 2;
            } dp[0] = 1 dp[0] dp 0 1 dp[1] = 2 dp[1] dp 1 2 for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        } int i = 2; int i = 2; i 2 i < n i n i++ i++ i {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        } {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        } 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 if (a[i] == 1) {
                dp[i] = 0;
            } a[i] == 1 a[i] a i 1 {
                dp[i] = 0;
            } dp[i] = 0 dp[i] dp i 0 out.println(dp[n-1]) out.println out dp[n-1] dp n-1 n 1 out.flush() out.flush out String[] args args class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

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

    public Integer nextInt() {
        return Integer.valueOf(next());
    }
    public Long nextLong() {return  Long.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
} InputReader StringTokenizer tokenizer; tokenizer public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    } InputReader {
        super(new InputStreamReader(inputStream), 32768);
    } super(new InputStreamReader(inputStream), 32768) super new InputStreamReader(inputStream) 32768 InputStream inputStream inputStream public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    } InputReader {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    } super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename))) super new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)) String filename filename public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    } next {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        }
        return tokenizer.nextToken();
    } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
            try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            }
        } try {
                tokenizer = new StringTokenizer(readLine());
            } catch (IOException e) {
                throw new RuntimeException();
            } catch (IOException e) {
                throw new RuntimeException();
            } IOException e {
                throw new RuntimeException();
            } throw new RuntimeException(); new RuntimeException() {
                tokenizer = new StringTokenizer(readLine());
            } tokenizer = new StringTokenizer(readLine()) tokenizer new StringTokenizer(readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public Integer nextInt() {
        return Integer.valueOf(next());
    } nextInt {
        return Integer.valueOf(next());
    } return Integer.valueOf(next()); Integer.valueOf(next()) Integer.valueOf Integer next() next public Long nextLong() {return  Long.valueOf(next());} nextLong {return  Long.valueOf(next());} return  Long.valueOf(next()); Long.valueOf(next()) Long.valueOf Long next() next static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    } OutputWriter public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        } OutputWriter {
            super(outputStream);
        } super(outputStream) super outputStream OutputStream outputStream outputStream public OutputWriter(Writer writer) {
            super(writer);
        } OutputWriter {
            super(writer);
        } super(writer) super writer Writer writer writer public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        } OutputWriter {
            super(filename);
        } super(filename) super filename String filename filename public void close() {
            super.close();
        } close {
            super.close();
        } super.close() super.close super PrintWriter BufferedReader public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    }

} public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    }

} Main
import java.io.*;
import java.util.*;


public class Main {

    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        InputReader.OutputWriter out = new InputReader.OutputWriter(outputStream);


        int n = in.nextInt();
        int m = in.nextInt();
        int mod = 1_000_000_000 + 7;
        int [] a = new int[n];
        for (int i = 0; i < m; i++) {
            a[in.nextInt() - 1] = 1;
        }
        if(n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        int [] dp = new int[n];
        if(a[0] == 1) {
            if(a[1] != 1) {
                dp[1] = 1;
            }
        }
        else {
            if(a[1] == 1) dp[1] = 0;
            else {
                dp[0] = 1;
                dp[1] = 2;
            }
        }
        for (int i = 2; i < n; i++) {
            dp[i] = (dp[i-1] + dp[i-2])%mod;
            if (a[i] == 1) {
                dp[i] = 0;
            }
        }
        
        out.println(dp[n-1]);
        out.flush();
    }

}

class InputReader extends BufferedReader {
    StringTokenizer tokenizer;

    public InputReader(InputStream inputStream) {
        super(new InputStreamReader(inputStream), 32768);
    }

    public InputReader(String filename) {
        super(new InputStreamReader(Thread.currentThread().getContextClassLoader().getResourceAsStream(filename)));
    }

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

    public Integer nextInt() {
        return Integer.valueOf(next());
    }
    public Long nextLong() {return  Long.valueOf(next());}

    static class OutputWriter extends PrintWriter {
        public OutputWriter(OutputStream outputStream) {
            super(outputStream);
        }

        public OutputWriter(Writer writer) {
            super(writer);
        }

        public OutputWriter(String filename) throws FileNotFoundException {
            super(filename);
        }

        public void close() {
            super.close();
        }
    }
}
