import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int MOD =  1000000007;
    boolean move[] = new boolean[N+3];
    //初期化
    for (int i=0;i<N+3;i++){
      move[i] = true;
    }
    for (int i=0;i<M;i++){
      int a = sc.nextInt();
      move[a] = false;
    }
    
    int DParray[] = new int[N+5];
    for (int i=0;i<N+3;i++){
      DParray[i] = 0;
    }
    DParray[0] = 1;
    
    for (int i=0;i<N;i++){
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    }
    
    System.out.println(DParray[N]%MOD);
  }
}
   import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int MOD =  1000000007;
    boolean move[] = new boolean[N+3];
    //初期化
    for (int i=0;i<N+3;i++){
      move[i] = true;
    }
    for (int i=0;i<M;i++){
      int a = sc.nextInt();
      move[a] = false;
    }
    
    int DParray[] = new int[N+5];
    for (int i=0;i<N+3;i++){
      DParray[i] = 0;
    }
    DParray[0] = 1;
    
    for (int i=0;i<N;i++){
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    }
    
    System.out.println(DParray[N]%MOD);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int MOD =  1000000007;
    boolean move[] = new boolean[N+3];
    //初期化
    for (int i=0;i<N+3;i++){
      move[i] = true;
    }
    for (int i=0;i<M;i++){
      int a = sc.nextInt();
      move[a] = false;
    }
    
    int DParray[] = new int[N+5];
    for (int i=0;i<N+3;i++){
      DParray[i] = 0;
    }
    DParray[0] = 1;
    
    for (int i=0;i<N;i++){
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    }
    
    System.out.println(DParray[N]%MOD);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int MOD =  1000000007;
    boolean move[] = new boolean[N+3];
    //初期化
    for (int i=0;i<N+3;i++){
      move[i] = true;
    }
    for (int i=0;i<M;i++){
      int a = sc.nextInt();
      move[a] = false;
    }
    
    int DParray[] = new int[N+5];
    for (int i=0;i<N+3;i++){
      DParray[i] = 0;
    }
    DParray[0] = 1;
    
    for (int i=0;i<N;i++){
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    }
    
    System.out.println(DParray[N]%MOD);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int MOD =  1000000007; MOD 1000000007 boolean move[] = new boolean[N+3]; move new boolean[N+3] N+3 N 3 for (int i=0;i<N+3;i++){
      move[i] = true;
    } int i=0; int i=0; i 0 i<N+3 i N+3 N 3 i++ i++ i {
      move[i] = true;
    } {
      move[i] = true;
    } move[i] = true move[i] move i true for (int i=0;i<M;i++){
      int a = sc.nextInt();
      move[a] = false;
    } int i=0; int i=0; i 0 i<M i M i++ i++ i {
      int a = sc.nextInt();
      move[a] = false;
    } {
      int a = sc.nextInt();
      move[a] = false;
    } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc move[a] = false move[a] move a false int DParray[] = new int[N+5]; DParray new int[N+5] N+5 N 5 for (int i=0;i<N+3;i++){
      DParray[i] = 0;
    } int i=0; int i=0; i 0 i<N+3 i N+3 N 3 i++ i++ i {
      DParray[i] = 0;
    } {
      DParray[i] = 0;
    } DParray[i] = 0 DParray[i] DParray i 0 DParray[0] = 1 DParray[0] DParray 0 1 for (int i=0;i<N;i++){
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    } {
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    } if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      } move[i+1] move i+1 i 1 {
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      } DParray[i+1] += DParray[i] DParray[i+1] DParray i+1 i 1 DParray[i] DParray i DParray[i+1] %= MOD DParray[i+1] DParray i+1 i 1 MOD if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      } move[i+2] move i+2 i 2 {
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      } DParray[i+2] += DParray[i] DParray[i+2] DParray i+2 i 2 DParray[i] DParray i DParray[i+2] %= MOD DParray[i+2] DParray i+2 i 2 MOD System.out.println(DParray[N]%MOD) System.out.println System.out System System.out DParray[N]%MOD DParray[N] DParray N MOD String[] args args
import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int MOD =  1000000007;
    boolean move[] = new boolean[N+3];
    //初期化
    for (int i=0;i<N+3;i++){
      move[i] = true;
    }
    for (int i=0;i<M;i++){
      int a = sc.nextInt();
      move[a] = false;
    }
    
    int DParray[] = new int[N+5];
    for (int i=0;i<N+3;i++){
      DParray[i] = 0;
    }
    DParray[0] = 1;
    
    for (int i=0;i<N;i++){
      if(move[i+1]){
        DParray[i+1] += DParray[i];
        DParray[i+1] %= MOD;
      }
      if(move[i+2]){
        DParray[i+2] += DParray[i];
        DParray[i+2] %= MOD;
      }
    }
    
    System.out.println(DParray[N]%MOD);
  }
}
  