import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	}

	public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	}

	public static long mod(long N) {

		return (long) N % 1000000007;

	}

} import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	}

	public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	}

	public static long mod(long N) {

		return (long) N % 1000000007;

	}

} Main public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	} main {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	} 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[] n = new int[N+1]; n new int[N+1] N+1 N 1 for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		} int i = 1; int i = 1; i 1 i <= M i M i++ i++ i {
			int x = sc.nextInt();
			n[x] = 1;
		} {
			int x = sc.nextInt();
			n[x] = 1;
		} int x = sc.nextInt(); x sc.nextInt() sc.nextInt sc n[x] = 1 n[x] n x 1 int cnt = 1; cnt 1 long ans = 1; ans 1 for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		} {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		} if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			} n[i]!=1 n[i] n i 1 {
				cnt++;
			} cnt++ cnt {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			} ans = mod(ans * mod(solve(cnt))) ans mod(ans * mod(solve(cnt))) mod ans * mod(solve(cnt)) ans mod(solve(cnt)) mod solve(cnt) solve cnt cnt =0 cnt 0 ans = mod(ans * mod(solve(cnt))) ans mod(ans * mod(solve(cnt))) mod ans * mod(solve(cnt)) ans mod(solve(cnt)) mod solve(cnt) solve cnt System.out.println(ans) System.out.println System.out System System.out ans String[] args args public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	} solve {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	} if (N==0) return 0; N==0 N 0 return 0; 0 if (N==1||N==2)	return 1; N==1||N==2 N==1 N 1 N==2 N 2 return 1; 1 long num1 = 1; num1 1 long num2 = 1; num2 1 long tmp = 1; tmp 1 for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		} int i = 1; int i = 1; i 1 i < N-1 i N-1 N 1 i++ i++ i {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		} {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		} tmp = mod(num1 + num2) tmp mod(num1 + num2) mod num1 + num2 num1 num2 num1 = mod(num2) num1 mod(num2) mod num2 num2 = mod(tmp) num2 mod(tmp) mod tmp return tmp; tmp int N N public static long mod(long N) {

		return (long) N % 1000000007;

	} mod {

		return (long) N % 1000000007;

	} return (long) N % 1000000007; (long) N % 1000000007 (long) N 1000000007 long N N public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	}

	public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	}

	public static long mod(long N) {

		return (long) N % 1000000007;

	}

} public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	}

	public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	}

	public static long mod(long N) {

		return (long) N % 1000000007;

	}

} Main
import java.io.FileNotFoundException;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	}

	public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	}

	public static long mod(long N) {

		return (long) N % 1000000007;

	}

}
