import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	}
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.math.BigInteger; BigInteger java.math public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	} 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 a[] = new int[n+1]; a new int[n+1] n+1 n 1 for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
		    a[sc.nextInt()] = 1;
		} {
		    a[sc.nextInt()] = 1;
		} a[sc.nextInt()] = 1 a[sc.nextInt()] a sc.nextInt() sc.nextInt sc 1 long result = 0; result 0 long[] dp = new long[n+1]; dp new long[n+1] n+1 n 1 for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		} int i = 1; int i = 1; i 1 i < n+1 i n+1 n 1 i++ i++ i {
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		} {
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		} if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    } a[i] == 1 a[i] a i 1 {
		        dp[i] = 0;
		    } dp[i] = 0 dp[i] dp i 0 if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    } i == 1 i 1 {
		        dp[i] = 1;
		    } dp[i] = 1 dp[i] dp i 1 if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    } i == 2 i 2 {
		        dp[i] = dp[i-1] + 1;
		    } dp[i] = dp[i-1] + 1 dp[i] dp i dp[i-1] + 1 dp[i-1] dp i-1 i 1 1 {
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    } dp[i] = dp[i-1] + dp[i-2] dp[i] dp i dp[i-1] + dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 dp[i] %= 1000000007 dp[i] dp i 1000000007 result = dp[n] result dp[n] dp n System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	}
} Main
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		int m = sc.nextInt();
		int a[] = new int[n+1];
		for(int i = 0; i < m; i++){
		    a[sc.nextInt()] = 1;
		}
		// 計算
		long result = 0;
		long[] dp = new long[n+1];
		for(int i = 1; i < n+1; i++){
		    if(a[i] == 1){
		        dp[i] = 0;
		    }else if(i == 1){
		        dp[i] = 1;
		    }else if(i == 2){
		        dp[i] = dp[i-1] + 1;
		    }else{
		        dp[i] = dp[i-1] + dp[i-2];
		        dp[i] %= 1000000007;
		    }
		}
		result = dp[n];
		// 出力
		System.out.println(result);
		
	}
}
