import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    }
} import java.io.BufferedInputStream; BufferedInputStream java.io import java.io.BufferedOutputStream; BufferedOutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    }
} Main public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    } main {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    } try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        } {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        } BufferedInputStream in = new BufferedInputStream(System.in) BufferedInputStream in = new BufferedInputStream(System.in) new BufferedInputStream(System.in) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out)) new PrintWriter(new BufferedOutputStream(System.out)) Scanner sc = new Scanner(in); sc new Scanner(in) int mod = 1_000_000_007; mod 1_000_000_007 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] as = new int[m]; as new int[m] m Set<Integer> broken = new HashSet<>(); broken new HashSet<>() for (int i = 0; i < as.length; i++) broken.add(sc.nextInt()); int i = 0; int i = 0; i 0 i < as.length i as.length as as.length i++ i++ i broken.add(sc.nextInt()); broken.add(sc.nextInt()) broken.add broken sc.nextInt() sc.nextInt sc int[] dp = new int[n + 1]; dp new int[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            } if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            } !broken.contains(i) broken.contains(i) broken.contains broken i {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                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 if (i - 2 >= 0) dp[i] += dp[i - 2]; i - 2 >= 0 i - 2 i 2 0 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 String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    }
} Main
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

    public static void main(String[] args) throws Exception {
        try (BufferedInputStream in = new BufferedInputStream(System.in);
             PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {

            Scanner sc = new Scanner(in);

            // 10:42-

            int mod = 1_000_000_007;
            int n = sc.nextInt();
            int m = sc.nextInt();
            int[] as = new int[m];

            Set<Integer> broken = new HashSet<>();
            for (int i = 0; i < as.length; i++) broken.add(sc.nextInt());

            int[] dp = new int[n + 1];
            dp[0] = 1;

            for (int i = 1; i <= n; i++) if (!broken.contains(i)) {
                dp[i] += dp[i - 1];
                dp[i] %= mod;
                if (i - 2 >= 0) dp[i] += dp[i - 2];
                dp[i] %= mod;
            }

            out.println(dp[n]);
        }
    }
}
