import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTypicalStairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        }

    }

    static class ModInt {
        public long val;
        final int MOD = (int) 1e9 + 7;

        public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        }

        public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        }

        public long getVal() {
            return val;
        }

        public String toString() {
            return Long.toString(val);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTypicalStairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        }

    }

    static class ModInt {
        public long val;
        final int MOD = (int) 1e9 + 7;

        public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        }

        public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        }

        public long getVal() {
            return val;
        }

        public String toString() {
            return Long.toString(val);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out Scanner in = new Scanner(inputStream); in new Scanner(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) CTypicalStairs solver = new CTypicalStairs(); solver new CTypicalStairs() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class CTypicalStairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        }

    } CTypicalStairs public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        } solve {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        } int n = in.nextInt(); n in.nextInt() in.nextInt in int m = in.nextInt(); m in.nextInt() in.nextInt in ModInt[] res = new ModInt[n + 1]; res new ModInt[n + 1] n + 1 n 1 HashSet<Integer> hs = new HashSet<>(); hs new HashSet<>() for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
                hs.add(in.nextInt());
            } {
                hs.add(in.nextInt());
            } hs.add(in.nextInt()) hs.add hs in.nextInt() in.nextInt in res[0] = new ModInt(1) res[0] res 0 new ModInt(1) for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            } {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            } if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                } hs.contains(i) hs.contains hs i {
                    // broken
                    res[i] = new ModInt(0);
                } res[i] = new ModInt(0) res[i] res i new ModInt(0) {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                } res[i] = new ModInt(0) res[i] res i new ModInt(0) try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    } ArrayIndexOutOfBoundsException ignored {
                    } {
                        res[i] = res[i].add(res[i - 1]);
                    } res[i] = res[i].add(res[i - 1]) res[i] res i res[i].add(res[i - 1]) res[i].add res[i] res i res[i - 1] res i - 1 i 1 try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    } ArrayIndexOutOfBoundsException ignored {
                    } {
                        res[i] = res[i].add(res[i - 2]);
                    } res[i] = res[i].add(res[i - 2]) res[i] res i res[i].add(res[i - 2]) res[i].add res[i] res i res[i - 2] res i - 2 i 2 out.println(res[n].getVal()) out.println out res[n].getVal() res[n].getVal res[n] res n int testNumber testNumber Scanner in in PrintWriter out out static class ModInt {
        public long val;
        final int MOD = (int) 1e9 + 7;

        public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        }

        public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        }

        public long getVal() {
            return val;
        }

        public String toString() {
            return Long.toString(val);
        }

    } ModInt public long val; val final int MOD = (int) 1e9 + 7; MOD (int) 1e9 + 7 (int) 1e9 7 public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        } ModInt {
            this.val = (i + MOD) % MOD;
        } this.val = (i + MOD) % MOD this.val this this.val (i + MOD) % MOD (i + MOD) i MOD MOD long i i public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        } add {
            return new ModInt(this.val + m.val);
        } return new ModInt(this.val + m.val); new ModInt(this.val + m.val) ModInt m m public long getVal() {
            return val;
        } getVal {
            return val;
        } return val; val public String toString() {
            return Long.toString(val);
        } toString {
            return Long.toString(val);
        } return Long.toString(val); Long.toString(val) Long.toString Long val public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTypicalStairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        }

    }

    static class ModInt {
        public long val;
        final int MOD = (int) 1e9 + 7;

        public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        }

        public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        }

        public long getVal() {
            return val;
        }

        public String toString() {
            return Long.toString(val);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTypicalStairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        }

    }

    static class ModInt {
        public long val;
        final int MOD = (int) 1e9 + 7;

        public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        }

        public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        }

        public long getVal() {
            return val;
        }

        public String toString() {
            return Long.toString(val);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author silviase
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CTypicalStairs solver = new CTypicalStairs();
        solver.solve(1, in, out);
        out.close();
    }

    static class CTypicalStairs {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            ModInt[] res = new ModInt[n + 1];
            HashSet<Integer> hs = new HashSet<>();
            for (int i = 0; i < m; i++) {
                hs.add(in.nextInt());
            }

            res[0] = new ModInt(1);
            for (int i = 1; i <= n; i++) {
                if (hs.contains(i)) {
                    // broken
                    res[i] = new ModInt(0);
                } else {
                    res[i] = new ModInt(0);
                    try {
                        res[i] = res[i].add(res[i - 1]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                    try {
                        res[i] = res[i].add(res[i - 2]);
                    } catch (ArrayIndexOutOfBoundsException ignored) {
                    }
                }
            }

            out.println(res[n].getVal());

        }

    }

    static class ModInt {
        public long val;
        final int MOD = (int) 1e9 + 7;

        public ModInt(long i) {
            this.val = (i + MOD) % MOD;
        }

        public ModInt add(ModInt m) {
            return new ModInt(this.val + m.val);
        }

        public long getVal() {
            return val;
        }

        public String toString() {
            return Long.toString(val);
        }

    }
}

