import java.util.*;
import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  } main {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int M = in.nextInt(); M in.nextInt() in.nextInt in if (N == 1) {
      System.out.println(1);
      return;
    } N == 1 N 1 {
      System.out.println(1);
      return;
    } System.out.println(1) System.out.println System.out System System.out 1 return; int[] A = new int[N]; A new int[N] N Arrays.fill(A, 1) Arrays.fill Arrays A 1 for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      A[in.nextInt() - 1] = 0;
    } {
      A[in.nextInt() - 1] = 0;
    } A[in.nextInt() - 1] = 0 A[in.nextInt() - 1] A in.nextInt() - 1 in.nextInt() in.nextInt in 1 0 long[] B = new long[N]; B new long[N] N B[0] = A[0] B[0] B 0 A[0] A 0 B[1] = (A[0] + A[1]) * A[1] B[1] B 1 (A[0] + A[1]) * A[1] (A[0] + A[1]) A[0] A 0 A[1] A 1 A[1] A 1 for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    } int i = 2; int i = 2; i 2 i < N i N i++ i++ i {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    } {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    } B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i] B[i] B i ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i] ((B[i - 1] + B[i - 2]) % 1_000_000_007L) (B[i - 1] + B[i - 2]) B[i - 1] B i - 1 i 1 B[i - 2] B i - 2 i 2 1_000_000_007L (long) A[i] A i System.out.println(B[N - 1]) System.out.println System.out System System.out B[N - 1] B N - 1 N 1 String[] args args public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  }
} Main
import java.util.*;
import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int M = in.nextInt();
    if (N == 1) {
      System.out.println(1);
      return;
    }
    int[] A = new int[N];
    Arrays.fill(A, 1);
    for (int i = 0; i < M; i++) {
      A[in.nextInt() - 1] = 0;
    }
    long[] B = new long[N];
    B[0] = A[0];
    B[1] = (A[0] + A[1]) * A[1];
    for (int i = 2; i < N; i++) {
      B[i] = ((B[i - 1] + B[i - 2]) % 1_000_000_007L) * (long) A[i];
    }
    System.out.println(B[N - 1]);
  }
}