import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  }
} Main public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  } main {
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] S = sc.nextLine().split(" "); S sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int N = Integer.parseInt(S[0]); N Integer.parseInt(S[0]) Integer.parseInt Integer S[0] S 0 int M = Integer.parseInt(S[1]); M Integer.parseInt(S[1]) Integer.parseInt Integer S[1] S 1 int p = 1000000007; p 1000000007 boolean[] check = new boolean[N+1]; check new boolean[N+1] N+1 N 1 for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    } {
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    } int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc check[n] = true check[n] check n true long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 dp[0] = 1 dp[0] dp 0 1 for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    } {
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    } if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      } check[i] check i {
        dp[i] = 0;
      } dp[i] = 0 dp[i] dp i 0 if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      } i == N-1 i N-1 N 1 {
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      } dp[i+1] = (dp[i+1] + dp[i]) % p dp[i+1] dp i+1 i 1 (dp[i+1] + dp[i]) % p (dp[i+1] + dp[i]) dp[i+1] dp i+1 i 1 dp[i] dp i p {
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      } dp[i+1] = (dp[i+1] + dp[i]) % p dp[i+1] dp i+1 i 1 (dp[i+1] + dp[i]) % p (dp[i+1] + dp[i]) dp[i+1] dp i+1 i 1 dp[i] dp i p dp[i+2] = (dp[i+2] + dp[i]) % p dp[i+2] dp i+2 i 2 (dp[i+2] + dp[i]) % p (dp[i+2] + dp[i]) dp[i+2] dp i+2 i 2 dp[i] dp i p System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[]args args public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  }
} public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[]args){
    Scanner sc = new Scanner(System.in);
    String[] S = sc.nextLine().split(" ");
    int N = Integer.parseInt(S[0]);
    int M = Integer.parseInt(S[1]);
    int p = 1000000007;
    boolean[] check = new boolean[N+1];
    
    for(int i = 0; i < M; i++){
      int n = Integer.parseInt(sc.nextLine());
      check[n] = true;
    }
    
    long[] dp = new long[N+1];
    dp[0] = 1;
    for(int i = 0; i < N; i++){
      if(check[i]){
        dp[i] = 0;
      }else if(i == N-1){
        dp[i+1] = (dp[i+1] + dp[i]) % p;
      }else{
        dp[i+1] = (dp[i+1] + dp[i]) % p;
        dp[i+2] = (dp[i+2] + dp[i]) % p;
      }
    }
    
    System.out.println(dp[N]);
  }
}