import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	}

	static long fibonatch(int num) {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	}

	static long fibonatch(int num) {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	} main {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int sum = sc.nextInt(); sum sc.nextInt() sc.nextInt sc int broken_sum = sc.nextInt(); broken_sum sc.nextInt() sc.nextInt sc int[] array = new int[broken_sum + 1]; array new int[broken_sum + 1] broken_sum + 1 broken_sum 1 for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		} int i=0; int i=0; i 0 i<broken_sum i broken_sum i++ i++ i {
			array[i] = sc.nextInt();
		} {
			array[i] = sc.nextInt();
		} array[i] = sc.nextInt() array[i] array i sc.nextInt() sc.nextInt sc array[broken_sum] = sum + 1 array[broken_sum] array broken_sum sum + 1 sum 1 long result = (fibonatch(array[0]))% 1000000007; result (fibonatch(array[0]))% 1000000007 (fibonatch(array[0])) fibonatch array[0] array 0 1000000007 for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		} int i=1; int i=1; i 1 i<broken_sum+1 i broken_sum+1 broken_sum 1 i++ i++ i {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		} {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		} if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			} array[i] -  array[i-1] == 1 array[i] -  array[i-1] array[i] array i array[i-1] array i-1 i 1 1 {
				result = 0;
				break;
			} result = 0 result 0 break; result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007 result (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007 (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) result * fibonatch(array[i] -  array[i-1] - 1) result fibonatch(array[i] -  array[i-1] - 1) fibonatch array[i] -  array[i-1] - 1 array[i] -  array[i-1] - 1 array[i] array i array[i-1] array i-1 i 1 1 1000000007 1000000007 System.out.println(result % 1000000007) System.out.println System.out System System.out result % 1000000007 result 1000000007 String[] args args static long fibonatch(int num) {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	} fibonatch {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	} long tmp1 = 1; tmp1 1 long tmp2 = 1; tmp2 1 if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		} num < 3 num 3 {
			return 1;
		} return 1; 1 {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		} long n = 0; n 0 for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			} long i = 3; long i = 3; i 3 i <= num i num i ++ i ++ i {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			} {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			} n = (tmp1 + tmp2) % 1000000007 n (tmp1 + tmp2) % 1000000007 (tmp1 + tmp2) tmp1 tmp2 1000000007 tmp1 = tmp2 % 1000000007 tmp1 tmp2 % 1000000007 tmp2 1000000007 tmp2 = n % 1000000007 tmp2 n % 1000000007 n 1000000007 return n; n int num num public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	}

	static long fibonatch(int num) {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	}

} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	}

	static long fibonatch(int num) {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int sum = sc.nextInt();
		int broken_sum = sc.nextInt();
		int[] array = new int[broken_sum + 1];

		for (int i=0; i<broken_sum; i++) {
			array[i] = sc.nextInt();
		}
		array[broken_sum] = sum + 1;

		long result = (fibonatch(array[0]))% 1000000007;

		for (int i=1; i<broken_sum+1; i++) {
			if (array[i] -  array[i-1] == 1) {
				result = 0;
				break;
			}
			result = (result * fibonatch(array[i] -  array[i-1] - 1) % 1000000007) % 1000000007;
		}


		System.out.println(result % 1000000007);
	}

	static long fibonatch(int num) {
		long tmp1 = 1;
		long tmp2 = 1;


		if (num < 3) {
			return 1;
		} else {
			long n = 0;
			for (long i = 3; i <= num; i ++) {
				n = (tmp1 + tmp2) % 1000000007;
				tmp1 = tmp2 % 1000000007;
				tmp2 = n % 1000000007;
			}
			return n;
		}

	}

}
