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

public class Main {
  public static void main(String[] args) {
    new Main().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }

  int  atoi(String s) { return Integer.parseInt(s); }
  long atol(String s) { return Long.parseLong(s);   }
} import java.io.*; io.* java import java.util.Arrays; Arrays java.util public class Main {
  public static void main(String[] args) {
    new Main().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }

  int  atoi(String s) { return Integer.parseInt(s); }
  long atol(String s) { return Long.parseLong(s);   }
} Main public static void main(String[] args) {
    new Main().run();
  } main {
    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  } run {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  } try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    } catch(IOException e) {
      System.err.println(e);
    } IOException e {
      System.err.println(e);
    } System.err.println(e) System.err.println System.err System System.err e {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) BufferedReader in = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) PrintWriter out = new PrintWriter(System.out) PrintWriter out = new PrintWriter(System.out) new PrintWriter(System.out) final int mod = 1_000_000_007; mod 1_000_000_007 String[] ln = in.readLine().split(" "); ln in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " final int n = atoi(ln[0]); n atoi(ln[0]) atoi ln[0] ln 0 final int m = atoi(ln[1]); m atoi(ln[1]) atoi ln[1] ln 1 boolean[] isBroken = new boolean[n+2]; isBroken new boolean[n+2] n+2 n 2 for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          } {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          } int x = atoi(in.readLine()); x atoi(in.readLine()) atoi in.readLine() in.readLine in isBroken[x] = true isBroken[x] isBroken x true long[] dp = new long[n+2]; dp new long[n+2] n+2 n 2 dp[0] = 1L dp[0] dp 0 1L for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          } {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          } for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            } int j = i+1; int j = i+1; j i+1 i 1 j <= i+2 j i+2 i 2 j++ j++ j {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            } {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            } if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              } !isBroken[j] isBroken[j] isBroken j {
                dp[j] += dp[i];
                dp[j] %= mod;
              } dp[j] += dp[i] dp[j] dp j dp[i] dp i dp[j] %= mod dp[j] dp j mod final long ans = dp[n]; ans dp[n] dp n out.println(ans) out.println out ans int  atoi(String s) { return Integer.parseInt(s); } atoi { return Integer.parseInt(s); } return Integer.parseInt(s); Integer.parseInt(s) Integer.parseInt Integer s String s s long atol(String s) { return Long.parseLong(s);   } atol { return Long.parseLong(s);   } return Long.parseLong(s); Long.parseLong(s) Long.parseLong Long s String s s public class Main {
  public static void main(String[] args) {
    new Main().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }

  int  atoi(String s) { return Integer.parseInt(s); }
  long atol(String s) { return Long.parseLong(s);   }
} public class Main {
  public static void main(String[] args) {
    new Main().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }

  int  atoi(String s) { return Integer.parseInt(s); }
  long atol(String s) { return Long.parseLong(s);   }
} Main
import java.io.*;
import java.util.Arrays;

public class Main {
  public static void main(String[] args) {
    new Main().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

          final int mod = 1_000_000_007;

          String[] ln = in.readLine().split(" ");
          final int n = atoi(ln[0]);
          final int m = atoi(ln[1]);

          boolean[] isBroken = new boolean[n+2];
          for (int i = 0; i < m; i++) {
            int x = atoi(in.readLine());
            isBroken[x] = true;
          }

          long[] dp = new long[n+2];
          dp[0] = 1L;
          for (int i = 0; i < n; i++) {
            for (int j = i+1; j <= i+2; j++) {
              if(!isBroken[j]) {
                dp[j] += dp[i];
                dp[j] %= mod;
              }
            }
          }

          final long ans = dp[n];
          out.println(ans);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }

  int  atoi(String s) { return Integer.parseInt(s); }
  long atol(String s) { return Long.parseLong(s);   }
}