import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;

public class Main {

    static PrintWriter out;
    static InputReader sc;

    static final int MOD = 1000000007;

    static void solve() {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    }

    public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    }

    static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    }

    static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    }
} import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Arrays; Arrays java.util import java.util.InputMismatchException; InputMismatchException java.util import java.util.NoSuchElementException; NoSuchElementException java.util public class Main {

    static PrintWriter out;
    static InputReader sc;

    static final int MOD = 1000000007;

    static void solve() {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    }

    public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    }

    static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    }

    static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    }
} Main static PrintWriter out; out static InputReader sc; sc static final int MOD = 1000000007; MOD 1000000007 static void solve() {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    } solve {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    } int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int[] dp = new int[N + 1]; dp new int[N + 1] N + 1 N 1 Arrays.fill(dp, -1) Arrays.fill Arrays dp -1 1 dp[0] = 1 dp[0] dp 0 1 for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            dp[sc.nextInt()] = 0;
        } {
            dp[sc.nextInt()] = 0;
        } dp[sc.nextInt()] = 0 dp[sc.nextInt()] dp sc.nextInt() sc.nextInt sc 0 for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        } {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        } if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            } dp[i] == -1 dp[i] dp i -1 1 {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            } if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                } i != 1 i 1 {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } dp[i] = dp[i - 1] + dp[i - 2] dp[i] dp i dp[i - 1] + dp[i - 2] dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 dp[i] %= MOD dp[i] dp i MOD {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                } dp[i] = dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 dp[i] %= MOD dp[i] dp i MOD out.println(dp[N]) out.println out dp[N] dp N public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    } main {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    } sc = new InputReader(System.in) sc new InputReader(System.in) out = new PrintWriter(System.out) out new PrintWriter(System.out) solve() solve out.flush() out.flush out String[] args args static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    } tr {
        out.println(Arrays.deepToString(o));
    } out.println(Arrays.deepToString(o)) out.println out Arrays.deepToString(o) Arrays.deepToString Arrays o Object... o o public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    } ArraysFillEx public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        } fill {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        } Class<?> type = array.getClass(); type array.getClass() array.getClass array if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            } !type.isArray() type.isArray() type.isArray type {
                throw new IllegalArgumentException("not array");
            } throw new IllegalArgumentException("not array"); new IllegalArgumentException("not array") String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase(); arrayClassName array.getClass().getSimpleName().replace("[]", "").toLowerCase() array.getClass().getSimpleName().replace("[]", "").toLowerCase array.getClass().getSimpleName().replace("[]", "") array.getClass().getSimpleName().replace array.getClass().getSimpleName() array.getClass().getSimpleName array.getClass() array.getClass array "[]" "" String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int"); valueClassName value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int") value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace value.getClass().getSimpleName().toLowerCase().replace("character", "char") value.getClass().getSimpleName().toLowerCase().replace value.getClass().getSimpleName().toLowerCase() value.getClass().getSimpleName().toLowerCase value.getClass().getSimpleName() value.getClass().getSimpleName value.getClass() value.getClass value "character" "char" "integer" "int" if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            } !arrayClassName.equals(valueClassName) arrayClassName.equals(valueClassName) arrayClassName.equals arrayClassName valueClassName {
                throw new IllegalArgumentException("does not match");
            } throw new IllegalArgumentException("does not match"); new IllegalArgumentException("does not match") if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } type.getComponentType().isArray() type.getComponentType().isArray type.getComponentType() type.getComponentType type {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } for (Object o : (Object[]) array) {
                    fill(o, value);
                } Object o (Object[]) array {
                    fill(o, value);
                } {
                    fill(o, value);
                } fill(o, value) fill o value if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof boolean[] array boolean[] {
                Arrays.fill((boolean[]) array, (boolean) value);
            } Arrays.fill((boolean[]) array, (boolean) value) Arrays.fill Arrays (boolean[]) array (boolean) value if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof char[] array char[] {
                Arrays.fill((char[]) array, (char) value);
            } Arrays.fill((char[]) array, (char) value) Arrays.fill Arrays (char[]) array (char) value if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof byte[] array byte[] {
                Arrays.fill((byte[]) array, (byte) value);
            } Arrays.fill((byte[]) array, (byte) value) Arrays.fill Arrays (byte[]) array (byte) value if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof short[] array short[] {
                Arrays.fill((short[]) array, (short) value);
            } Arrays.fill((short[]) array, (short) value) Arrays.fill Arrays (short[]) array (short) value if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof int[] array int[] {
                Arrays.fill((int[]) array, (int) value);
            } Arrays.fill((int[]) array, (int) value) Arrays.fill Arrays (int[]) array (int) value if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof long[] array long[] {
                Arrays.fill((long[]) array, (long) value);
            } Arrays.fill((long[]) array, (long) value) Arrays.fill Arrays (long[]) array (long) value if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof float[] array float[] {
                Arrays.fill((float[]) array, (float) value);
            } Arrays.fill((float[]) array, (float) value) Arrays.fill Arrays (float[]) array (float) value if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            } array instanceof double[] array double[] {
                Arrays.fill((double[]) array, (double) value);
            } Arrays.fill((double[]) array, (double) value) Arrays.fill Arrays (double[]) array (double) value {
                Arrays.fill((Object[]) array, value);
            } Arrays.fill((Object[]) array, value) Arrays.fill Arrays (Object[]) array value Object array array Object value value static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    } InputReader private InputStream in; in private byte[] buffer = new byte[1024]; buffer new byte[1024] 1024 private int curbuf; curbuf private int lenbuf; lenbuf public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        } InputReader {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        } this.in = in this.in this this.in in this.curbuf = this.lenbuf = 0 this.curbuf this this.curbuf this.lenbuf = 0 this.lenbuf this this.lenbuf 0 InputStream in in public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        } hasNextByte {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        } if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            } this.curbuf >= this.lenbuf this.curbuf this this.curbuf this.lenbuf this this.lenbuf {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            } this.curbuf = 0 this.curbuf this this.curbuf 0 try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                } catch (IOException e) {
                    throw new InputMismatchException();
                } IOException e {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() {
                    this.lenbuf = this.in.read(this.buffer);
                } this.lenbuf = this.in.read(this.buffer) this.lenbuf this this.lenbuf this.in.read(this.buffer) this.in.read this.in this this.in this.buffer this this.buffer if (this.lenbuf <= 0) {
                    return false;
                } this.lenbuf <= 0 this.lenbuf this this.lenbuf 0 {
                    return false;
                } return false; false return true; true private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        } readByte {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        } if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            } this.hasNextByte() this.hasNextByte this {
                return this.buffer[this.curbuf++];
            } return this.buffer[this.curbuf++]; this.buffer[this.curbuf++] this.buffer this this.buffer this.curbuf++ this.curbuf this this.curbuf {
                return -1;
            } return -1; -1 1 private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        } isSpaceChar {
            return !(c >= 33 && c <= 126);
        } return !(c >= 33 && c <= 126); !(c >= 33 && c <= 126) (c >= 33 && c <= 126) c >= 33 c 33 c <= 126 c 126 int c c private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        } skip {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        } while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            } this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf]) this.hasNextByte() this.hasNextByte this this.isSpaceChar(this.buffer[this.curbuf]) this.isSpaceChar this this.buffer[this.curbuf] this.buffer this this.buffer this.curbuf this this.curbuf {
                this.curbuf++;
            } this.curbuf++ this.curbuf this this.curbuf public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        } hasNext {
            this.skip();
            return this.hasNextByte();
        } this.skip() this.skip this return this.hasNextByte(); this.hasNextByte() this.hasNextByte this public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        } next {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        } if (!this.hasNext()) {
                throw new NoSuchElementException();
            } !this.hasNext() this.hasNext() this.hasNext this {
                throw new NoSuchElementException();
            } throw new NoSuchElementException(); new NoSuchElementException() StringBuilder sb = new StringBuilder(); sb new StringBuilder() int b = this.readByte(); b this.readByte() this.readByte this while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            } !this.isSpaceChar(b) this.isSpaceChar(b) this.isSpaceChar this b {
                sb.appendCodePoint(b);
                b = this.readByte();
            } sb.appendCodePoint(b) sb.appendCodePoint sb b b = this.readByte() b this.readByte() this.readByte this return sb.toString(); sb.toString() sb.toString sb public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        } nextInt {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        } if (!this.hasNext()) {
                throw new NoSuchElementException();
            } !this.hasNext() this.hasNext() this.hasNext this {
                throw new NoSuchElementException();
            } throw new NoSuchElementException(); new NoSuchElementException() int c = this.readByte(); c this.readByte() this.readByte this while (this.isSpaceChar(c)) {
                c = this.readByte();
            } this.isSpaceChar(c) this.isSpaceChar this c {
                c = this.readByte();
            } c = this.readByte() c this.readByte() this.readByte this boolean minus = false; minus false if (c == '-') {
                minus = true;
                c = this.readByte();
            } c == '-' c '-' {
                minus = true;
                c = this.readByte();
            } minus = true minus true c = this.readByte() c this.readByte() this.readByte this int res = 0; res 0 do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c)); !this.isSpaceChar(c) this.isSpaceChar(c) this.isSpaceChar this c {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                } c < '0' || c > '9' c < '0' c '0' c > '9' c '9' {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() res = res * 10 + c - '0' res res * 10 + c - '0' res * 10 + c res * 10 res 10 c '0' c = this.readByte() c this.readByte() this.readByte this return minus ? -res : res; minus ? -res : res minus -res res res public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        } nextLong {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        } if (!this.hasNext()) {
                throw new NoSuchElementException();
            } !this.hasNext() this.hasNext() this.hasNext this {
                throw new NoSuchElementException();
            } throw new NoSuchElementException(); new NoSuchElementException() int c = this.readByte(); c this.readByte() this.readByte this while (this.isSpaceChar(c)) {
                c = this.readByte();
            } this.isSpaceChar(c) this.isSpaceChar this c {
                c = this.readByte();
            } c = this.readByte() c this.readByte() this.readByte this boolean minus = false; minus false if (c == '-') {
                minus = true;
                c = this.readByte();
            } c == '-' c '-' {
                minus = true;
                c = this.readByte();
            } minus = true minus true c = this.readByte() c this.readByte() this.readByte this long res = 0; res 0 do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c)); !this.isSpaceChar(c) this.isSpaceChar(c) this.isSpaceChar this c {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                } c < '0' || c > '9' c < '0' c '0' c > '9' c '9' {
                    throw new InputMismatchException();
                } throw new InputMismatchException(); new InputMismatchException() res = res * 10 + c - '0' res res * 10 + c - '0' res * 10 + c res * 10 res 10 c '0' c = this.readByte() c this.readByte() this.readByte this return minus ? -res : res; minus ? -res : res minus -res res res public double nextDouble() {
            return Double.parseDouble(this.next());
        } nextDouble {
            return Double.parseDouble(this.next());
        } return Double.parseDouble(this.next()); Double.parseDouble(this.next()) Double.parseDouble Double this.next() this.next this public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        } nextIntArray {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        } int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                a[i] = this.nextInt();
            } {
                a[i] = this.nextInt();
            } a[i] = this.nextInt() a[i] a i this.nextInt() this.nextInt this return a; a int n n public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        } nextLongArray {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        } long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                a[i] = this.nextLong();
            } {
                a[i] = this.nextLong();
            } a[i] = this.nextLong() a[i] a i this.nextLong() this.nextLong this return a; a int n n public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        } nextCharMap {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        } char[][] map = new char[n][m]; map new char[n][m] n m for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                map[i] = this.next().toCharArray();
            } {
                map[i] = this.next().toCharArray();
            } map[i] = this.next().toCharArray() map[i] map i this.next().toCharArray() this.next().toCharArray this.next() this.next this return map; map int n n int m m public class Main {

    static PrintWriter out;
    static InputReader sc;

    static final int MOD = 1000000007;

    static void solve() {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    }

    public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    }

    static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    }

    static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    }
} public class Main {

    static PrintWriter out;
    static InputReader sc;

    static final int MOD = 1000000007;

    static void solve() {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    }

    public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    }

    static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    }

    static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    }
} Main
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;

public class Main {

    static PrintWriter out;
    static InputReader sc;

    static final int MOD = 1000000007;

    static void solve() {
        int N = sc.nextInt();
        int M = sc.nextInt();
        int[] dp = new int[N + 1];
        Arrays.fill(dp, -1);
        dp[0] = 1;
        for (int i = 0; i < M; i++) {
            dp[sc.nextInt()] = 0;
        }
        for (int i = 1; i <= N; i++) {
            if (dp[i] == -1) {
                if (i != 1) {
                    dp[i] = dp[i - 1] + dp[i - 2];
                    dp[i] %= MOD;
                } else {
                    dp[i] = dp[i - 1];
                    dp[i] %= MOD;
                }
            }
        }
        out.println(dp[N]);
    }

    public static void main(String[] args) {
        sc = new InputReader(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    public static class ArraysFillEx {

        public static void fill(Object array, Object value) {

            // 第一引数が配列か判定
            Class<?> type = array.getClass();
            if (!type.isArray()) {
                throw new IllegalArgumentException("not array");
            }

            // クラスの型を判定
            String arrayClassName = array.getClass().getSimpleName().replace("[]", "").toLowerCase();
            String valueClassName = value.getClass().getSimpleName().toLowerCase().replace("character", "char")
                    .replace("integer", "int");
            if (!arrayClassName.equals(valueClassName)) {
                throw new IllegalArgumentException("does not match");
            }

            // 処理
            if (type.getComponentType().isArray()) {
                for (Object o : (Object[]) array) {
                    fill(o, value);
                }
            } else if (array instanceof boolean[]) {
                Arrays.fill((boolean[]) array, (boolean) value);
            } else if (array instanceof char[]) {
                Arrays.fill((char[]) array, (char) value);
            } else if (array instanceof byte[]) {
                Arrays.fill((byte[]) array, (byte) value);
            } else if (array instanceof short[]) {
                Arrays.fill((short[]) array, (short) value);
            } else if (array instanceof int[]) {
                Arrays.fill((int[]) array, (int) value);
            } else if (array instanceof long[]) {
                Arrays.fill((long[]) array, (long) value);
            } else if (array instanceof float[]) {
                Arrays.fill((float[]) array, (float) value);
            } else if (array instanceof double[]) {
                Arrays.fill((double[]) array, (double) value);
            } else {
                Arrays.fill((Object[]) array, value);
            }
        }

    }

    static class InputReader {

        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int curbuf;
        private int lenbuf;

        public InputReader(InputStream in) {
            this.in = in;
            this.curbuf = this.lenbuf = 0;
        }

        public boolean hasNextByte() {
            if (this.curbuf >= this.lenbuf) {
                this.curbuf = 0;
                try {
                    this.lenbuf = this.in.read(this.buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (this.lenbuf <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (this.hasNextByte()) {
                return this.buffer[this.curbuf++];
            } else {
                return -1;
            }
        }

        private boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        private void skip() {
            while (this.hasNextByte() && this.isSpaceChar(this.buffer[this.curbuf])) {
                this.curbuf++;
            }
        }

        public boolean hasNext() {
            this.skip();
            return this.hasNextByte();
        }

        public String next() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            StringBuilder sb = new StringBuilder();
            int b = this.readByte();
            while (!this.isSpaceChar(b)) {
                sb.appendCodePoint(b);
                b = this.readByte();
            }
            return sb.toString();
        }

        public int nextInt() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public long nextLong() {
            if (!this.hasNext()) {
                throw new NoSuchElementException();
            }
            int c = this.readByte();
            while (this.isSpaceChar(c)) {
                c = this.readByte();
            }
            boolean minus = false;
            if (c == '-') {
                minus = true;
                c = this.readByte();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res = res * 10 + c - '0';
                c = this.readByte();
            } while (!this.isSpaceChar(c));
            return minus ? -res : res;
        }

        public double nextDouble() {
            return Double.parseDouble(this.next());
        }

        public int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextInt();
            }
            return a;
        }

        public long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = this.nextLong();
            }
            return a;
        }

        public char[][] nextCharMap(int n, int m) {
            char[][] map = new char[n][m];
            for (int i = 0; i < n; i++) {
                map[i] = this.next().toCharArray();
            }
            return map;
        }
    }

    static void tr(Object... o) {
        out.println(Arrays.deepToString(o));
    }
}
