import java.util.Arrays;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int N  = keyboard.nextInt(); N keyboard.nextInt() keyboard.nextInt keyboard int M  = keyboard.nextInt(); M keyboard.nextInt() keyboard.nextInt keyboard int[] B = new int[N+1]; B new int[N+1] N+1 N 1 for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        } {
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        } int tmp  = keyboard.nextInt(); tmp keyboard.nextInt() keyboard.nextInt keyboard B[tmp]= 1 B[tmp] B tmp 1 long[] sum = new long[N+1]; sum new long[N+1] N+1 N 1 sum[0] = 1 sum[0] sum 0 1 sum[1] = 1 - B[1] sum[1] sum 1 1 - B[1] 1 B[1] B 1 for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        } int j = 2; int j = 2; j 2 j < N+1 j N+1 N 1 j++ j++ j {
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        } {
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        } if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          } B[j] != 1 B[j] B j 1 {
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          } sum[j] = (sum[j-1]+sum[j-2])%1000000007 sum[j] sum j (sum[j-1]+sum[j-2])%1000000007 (sum[j-1]+sum[j-2]) sum[j-1] sum j-1 j 1 sum[j-2] sum j-2 j 2 1000000007 System.out.println(sum[N]) System.out.println System.out System System.out sum[N] sum N keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int M  = keyboard.nextInt();
		
		int[] B = new int[N+1];
        
        for(int i = 0; i < M; i++){
          int tmp  = keyboard.nextInt();
          B[tmp]= 1; 
        }
        
		long[] sum = new long[N+1];
		sum[0] = 1;
		sum[1] = 1 - B[1] ;
		
		for(int j = 2; j < N+1; j++){
			if(B[j] != 1){
          sum[j] = (sum[j-1]+sum[j-2])%1000000007 ;
          }
        }
        
		System.out.println(sum[N]);
		keyboard.close();	
	}
}
