import java.util.*;

public class Main {

	static int 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 + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	}
} import java.util.*; util.* java public class Main {

	static int 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 + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	}
} Main static int 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 + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		boolean[] broken = new boolean[N + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	} 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 + 10]; broken new boolean[N + 10] N + 10 N 10 Arrays.fill(broken, false) Arrays.fill Arrays broken false for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		} int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
			broken[sc.nextInt()] = true;
		} {
			broken[sc.nextInt()] = true;
		} broken[sc.nextInt()] = true broken[sc.nextInt()] broken sc.nextInt() sc.nextInt sc true sc.close() sc.close sc long[] dp = new long[N + 10]; dp new long[N + 10] N + 10 N 10 dp[0] = 0 dp[0] dp 0 0 dp[1] = broken[1] ? 0 : 1 dp[1] dp 1 broken[1] ? 0 : 1 broken[1] broken 1 0 1 if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		} broken[2] broken 2 {
			dp[2] = 0;
		} dp[2] = 0 dp[2] dp 2 0 if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		} broken[1] broken 1 {
			dp[2] = 1;
		} dp[2] = 1 dp[2] dp 2 1 {
			dp[2] = 2;
		} dp[2] = 2 dp[2] dp 2 2 for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		} int i = 3; int i = 3; i 3 i <= N i N i++ i++ i {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		} {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		} if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			} broken[i] broken i {
				dp[i] = 0;
			} dp[i] = 0 dp[i] dp i 0 {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			} dp[i] = (dp[i - 2] + dp[i - 1]) % MOD dp[i] dp i (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 String[] args args public class Main {

	static int 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 + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	}
} public class Main {

	static int 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 + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	}
} Main
import java.util.*;

public class Main {

	static int 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 + 10];
		Arrays.fill(broken, false);
		for (int i = 0; i < M; i++) {
			broken[sc.nextInt()] = true;
		}
		sc.close();

		long[] dp = new long[N + 10];
		dp[0] = 0;
		dp[1] = broken[1] ? 0 : 1;
		if (broken[2]) {
			dp[2] = 0;
		} else if (broken[1]) {
			dp[2] = 1;
		} else {
			dp[2] = 2;
		}
		for (int i = 3; i <= N; i++) {
			if (broken[i]) {
				dp[i] = 0;
			} else {
				dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
			}
		}

		System.out.println(dp[N]);
	}
}
