import java.util.Scanner;
 
public class Main {
	static final long MOD = 1_000_000_007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	static final long MOD = 1_000_000_007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	}
} Main static final long MOD = 1_000_000_007; MOD 1_000_000_007 public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	} 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 boolean[] broken = new boolean[n + 1]; broken new boolean[n + 1] n + 1 n 1 for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			int a = sc.nextInt();
			broken[a] = true;
		} {
			int a = sc.nextInt();
			broken[a] = true;
		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc broken[a] = true broken[a] broken a true long[] dp = new long[n + 1]; dp new long[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 dp[1] = broken[1] ? 0 : 1 dp[1] dp 1 broken[1] ? 0 : 1 broken[1] broken 1 0 1 for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		} int i = 2 ; int i = 2 ; i 2 i < dp.length i dp.length dp dp.length i++ i++ i {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		} {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		} dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD dp[i] dp i broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD broken[i] broken i 0 (dp[i - 2] + dp[i - 1]) % MOD (dp[i - 2] + dp[i - 1]) dp[i - 2] dp i - 2 i 2 dp[i - 1] dp i - 1 i 1 MOD System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n sc.close() sc.close sc String[] args args public class Main {
	static final long MOD = 1_000_000_007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	}
} public class Main {
	static final long MOD = 1_000_000_007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	}
} Main
import java.util.Scanner;
 
public class Main {
	static final long MOD = 1_000_000_007;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		
		
		boolean[] broken = new boolean[n + 1];
		for (int i = 0; i < m; i++) {
			int a = sc.nextInt();
			broken[a] = true;
		}
		
		long[] dp = new long[n + 1];
		dp[0] = 1;
		dp[1] = broken[1] ? 0 : 1;
		for (int i = 2 ; i < dp.length; i++) {
			dp[i] = broken[i] ? 0 : (dp[i - 2] + dp[i - 1]) % MOD;
		}
		
//		System.out.println(Arrays.toString(dp));
		
		System.out.println(dp[n]);
		
		sc.close();
	}
}

