import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	//static final PrintStream out = System.out; 多分大丈夫
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	}
	/*private static int nextInt() {		プログラムを高速化するためのメソッドで無くても大丈夫
		return Integer.parseInt(next());
	}
	private static long nextLong() {
		return Long.parseLong(next());
	}
	private static String next() {
		return sc.next();
	}
	*/

} import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	//static final PrintStream out = System.out; 多分大丈夫
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	}
	/*private static int nextInt() {		プログラムを高速化するためのメソッドで無くても大丈夫
		return Integer.parseInt(next());
	}
	private static long nextLong() {
		return Long.parseLong(next());
	}
	private static String next() {
		return sc.next();
	}
	*/

} Main //static final PrintStream out = System.out; 多分大丈夫
	static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) static final long Mod = 1000_000_007L; Mod 1000_000_007L public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	} main {
		Main main = new Main();
		main.solve();
		System.exit(0);
	} Main main = new Main(); main new Main() main.solve() main.solve main System.exit(0) System.exit System 0 String[] args args void solve() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	} solve {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	} int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int M = sc.nextInt(); M sc.nextInt() sc.nextInt sc int[] a = new int[M+2]; a new int[M+2] M+2 M 2 for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		} int i=1; int i=1; i 1 i<=M i M i++ i++ i {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		} {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		} a[i]=sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc sc.close() sc.close sc long[] dp = new long[N+1]; dp new long[N+1] N+1 N 1 int ta = 1; ta 1 dp[0] = 1 dp[0] dp 0 1 if(a[ta]!=1)dp[1]=dp[0];
		else ta++; a[ta]!=1 a[ta] a ta 1 dp[1]=dp[0] dp[1] dp 1 dp[0] dp 0 ta++ ta for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		} int i=2; int i=2; i 2 i<=N i N i++ i++ i {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		} {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		} if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			} a[ta]!=i a[ta] a ta i {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			} dp[i] = dp[i-2]+dp[i-1] dp[i] dp i dp[i-2]+dp[i-1] dp[i-2] dp i-2 i 2 dp[i-1] dp i-1 i 1 dp[i]-=dp[i]>Mod?Mod:0 dp[i] dp i dp[i]>Mod?Mod:0 dp[i]>Mod dp[i] dp i Mod Mod 0 {
				ta++;
			} ta++ ta System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N public class Main {
	//static final PrintStream out = System.out; 多分大丈夫
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	}
	/*private static int nextInt() {		プログラムを高速化するためのメソッドで無くても大丈夫
		return Integer.parseInt(next());
	}
	private static long nextLong() {
		return Long.parseLong(next());
	}
	private static String next() {
		return sc.next();
	}
	*/

} public class Main {
	//static final PrintStream out = System.out; 多分大丈夫
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	}
	/*private static int nextInt() {		プログラムを高速化するためのメソッドで無くても大丈夫
		return Integer.parseInt(next());
	}
	private static long nextLong() {
		return Long.parseLong(next());
	}
	private static String next() {
		return sc.next();
	}
	*/

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

public class Main {
	//static final PrintStream out = System.out; 多分大丈夫
	static Scanner sc = new Scanner(System.in);
	static final long Mod = 1000_000_007L;
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		System.exit(0);
	}

	void solve() {
		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] a = new int[M+2];
		for(int i=1;i<=M;i++) {   //0段目を配列a[0]に入れている
			a[i]=sc.nextInt();
		}
		sc.close();
		long[] dp = new long[N+1];
		int ta = 1;
		dp[0] = 1;
		if(a[ta]!=1)dp[1]=dp[0];
		else ta++;
		for(int i=2;i<=N;i++) {
			if(a[ta]!=i) {
				dp[i] = dp[i-2]+dp[i-1];
				dp[i]-=dp[i]>Mod?Mod:0;
			}else {
				ta++;
			}
		}
		//out.println(dp[N]);
		System.out.println(dp[N]);
	}
	/*private static int nextInt() {		プログラムを高速化するためのメソッドで無くても大丈夫
		return Integer.parseInt(next());
	}
	private static long nextLong() {
		return Long.parseLong(next());
	}
	private static String next() {
		return sc.next();
	}
	*/

}
