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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
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);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        static final int mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        }

    }
}
 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.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);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        static final int mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        }

    }
} 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);
        C solver = new C();
        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);
        C solver = new C();
        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) C solver = new C(); solver new C() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class C {
        static final int mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        }

    } C static final int mod = 1000000007; mod 1000000007 public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        } solve {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        } int N = Integer.parseInt(in.next()); N Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int M = Integer.parseInt(in.next()); M Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in int[] a = new int[N]; a new int[N] N boolean[] broken = new boolean[N + 1]; broken new boolean[N + 1] N + 1 N 1 for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            } {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            } a[i] = Integer.parseInt(in.next()) a[i] a i Integer.parseInt(in.next()) Integer.parseInt Integer in.next() in.next in broken[a[i]] = true broken[a[i]] broken a[i] a i true int[] dp = new int[N + 1]; dp new int[N + 1] N + 1 N 1 dp[0] = 1 dp[0] dp 0 1 if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            } broken[1] broken 1 {
                dp[1] = 0;
            } dp[1] = 0 dp[1] dp 1 0 {
                dp[1] = 1;
            } dp[1] = 1 dp[1] dp 1 1 for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            } int i = 2; int i = 2; i 2 i <= N i N i++ i++ i {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            } {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            } if (!broken[i - 1]) dp[i] += dp[i - 1]; !broken[i - 1] broken[i - 1] broken i - 1 i 1 dp[i] += dp[i - 1] dp[i] dp i dp[i - 1] dp i - 1 i 1 if (!broken[i - 2]) dp[i] += dp[i - 2]; !broken[i - 2] broken[i - 2] broken i - 2 i 2 dp[i] += dp[i - 2] dp[i] dp i dp[i - 2] dp i - 2 i 2 dp[i] %= mod dp[i] dp i mod out.println(dp[N]) out.println out dp[N] dp N int testNumber testNumber Scanner in in PrintWriter out out 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);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        static final int mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        }

    }
} 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);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        static final int mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        }

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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
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);
        C solver = new C();
        solver.solve(1, in, out);
        out.close();
    }

    static class C {
        static final int mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int N = Integer.parseInt(in.next());
            int M = Integer.parseInt(in.next());
            int[] a = new int[N];
            boolean[] broken = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                a[i] = Integer.parseInt(in.next());
                broken[a[i]] = true;
            }
            int[] dp = new int[N + 1];
//        Arrays.fill(dp,0);

            //dp[x]=dp[x-1]+dp[x-2]
            dp[0] = 1;
            if (broken[1]) {
                dp[1] = 0;
            } else {
                dp[1] = 1;
            }
            for (int i = 2; i <= N; i++) {
                if (!broken[i - 1]) dp[i] += dp[i - 1];
                if (!broken[i - 2]) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[N]);

        }

    }
}

