import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	static long mod=1000000007L;
	public static void main(String[] args) {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.UncheckedIOException; UncheckedIOException java.io import java.util.Arrays; Arrays java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
	static long mod=1000000007L;
	public static void main(String[] args) {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
} Main static long mod=1000000007L; mod 1000000007L public static void main(String[] args) {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	} main {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	} SC sc = new SC(System.in); sc new SC(System.in) int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc int M=sc.nextInt(); M sc.nextInt() sc.nextInt sc long[] dp=new long[N+1]; dp new long[N+1] N+1 N 1 Arrays.fill(dp,0) Arrays.fill Arrays dp 0 dp[0]=1 dp[0] dp 0 1 int[] dan=new int[M]; dan new int[M] M for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		} int i=0; int i=0; i 0 i<M i M i++ i++ i {
			dan[i]=sc.nextInt();
		} {
			dan[i]=sc.nextInt();
		} dan[i]=sc.nextInt() dan[i] dan i sc.nextInt() sc.nextInt sc for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		} int i=1; int i=1; i 1 i<M i M i++ i++ i {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		} {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		} if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			} dan[i]-dan[i-1]==1 dan[i]-dan[i-1] dan[i] dan i dan[i-1] dan i-1 i 1 1 {
				pl(0);
				System.exit(0);
			} pl(0) pl 0 System.exit(0) System.exit System 0 int counter=0; counter 0 for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		} {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		} if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			} i==1 i 1 {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			} if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				} counter<M && dan[counter]==i counter<M counter M dan[counter]==i dan[counter] dan counter i {
					dp[i]=0;	//踏めない
					counter++;
				} dp[i]=0 dp[i] dp i 0 counter++ counter {
					dp[i]=1;	//踏める
				} dp[i]=1 dp[i] dp i 1 {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			} if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				} counter<M && dan[counter]==i counter<M counter M dan[counter]==i dan[counter] dan counter i {
					dp[i]=0;
					counter++;
				} dp[i]=0 dp[i] dp i 0 counter++ counter {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				} dp[i]=dp[i-1]+dp[i-2] dp[i] dp i dp[i-1]+dp[i-2] dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 dp[i]%=mod dp[i] dp i mod pl(dp[N]) pl dp[N] dp N String[] args args public static void pl(Object o) {
		System.out.println(o);
	} pl {
		System.out.println(o);
	} System.out.println(o) System.out.println System.out System System.out o Object o o public static void pl() {
		System.out.println();
	} pl {
		System.out.println();
	} System.out.println() System.out.println System.out System System.out public static void p(Object o) {
		System.out.print(o);
	} p {
		System.out.print(o);
	} System.out.print(o) System.out.print System.out System System.out o Object o o static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	} SC private BufferedReader reader = null; reader null private StringTokenizer tokenizer = null; tokenizer null public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		} SC {
			reader = new BufferedReader(new InputStreamReader(in));
		} reader = new BufferedReader(new InputStreamReader(in)) reader new BufferedReader(new InputStreamReader(in)) InputStream in in public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		} next {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		} if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			} tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			} try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				} IOException e {
					throw new UncheckedIOException(e);
				} throw new UncheckedIOException(e); new UncheckedIOException(e) {
					tokenizer = new StringTokenizer(reader.readLine());
				} tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public double nextDouble() {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		} nextLine {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		} try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			} IOException e {
				throw new UncheckedIOException(e);
			} throw new UncheckedIOException(e); new UncheckedIOException(e) {
				return reader.readLine();
			} return reader.readLine(); reader.readLine() reader.readLine reader public class Main {
	static long mod=1000000007L;
	public static void main(String[] args) {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
} public class Main {
	static long mod=1000000007L;
	public static void main(String[] args) {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UncheckedIOException;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
	static long mod=1000000007L;
	public static void main(String[] args) {
		SC sc = new SC(System.in);
		int N=sc.nextInt();
		int M=sc.nextInt();
		long[] dp=new long[N+1];
		Arrays.fill(dp,0);
		dp[0]=1;
		int[] dan=new int[M];
		for(int i=0; i<M; i++) {
			dan[i]=sc.nextInt();
		}
		for(int i=1; i<M; i++) {
			if(dan[i]-dan[i-1]==1) {
				pl(0);
				System.exit(0);
			}
		}
		int counter=0;
		for(int i=1; i<=N; i++) {
			if(i==1) {	//2段前がない
				if(counter<M && dan[counter]==i) {
					dp[i]=0;	//踏めない
					counter++;
				}
				else {
					dp[i]=1;	//踏める
				}
			}
			else {
				if(counter<M && dan[counter]==i) {
					dp[i]=0;
					counter++;
				}
				else {
					dp[i]=dp[i-1]+dp[i-2];
					dp[i]%=mod;
				}
			}
		}
		pl(dp[N]);
	}
	static class SC {
		private BufferedReader reader = null;
		private StringTokenizer tokenizer = null;
		public SC(InputStream in) {
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public String next() {
			if (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new UncheckedIOException(e);
				}
			}
			return tokenizer.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public double nextDouble() {
			return Double.parseDouble(next());
		}
		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new UncheckedIOException(e);
			}
		}
	}
	public static void pl(Object o) {
		System.out.println(o);
	}
	public static void pl() {
		System.out.println();
	}
	public static void p(Object o) {
		System.out.print(o);
	}
}