import java.util.*;
import java.io.*;

public class Main {
	static int mod = (int) 1e9 + 7;
	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	}
}

//高速なScanner
class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

	public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	static int mod = (int) 1e9 + 7;
	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	}
} Main static int mod = (int) 1e9 + 7; mod (int) 1e9 + 7 (int) 1e9 7 public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	} main {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	} FastScanner fs = new FastScanner(System.in); fs new FastScanner(System.in) int N = fs.nextInt() N fs.nextInt() fs.nextInt fs M = fs.nextInt(); M fs.nextInt() fs.nextInt fs int a[] = new int[M+1]; a new int[M+1] M+1 M 1 for(int i=0;i<M;i++)a[i] = fs.nextInt(); int i=0; int i=0; i 0 i<M i M i++ i++ i a[i] = fs.nextInt(); a[i] = fs.nextInt() a[i] a i fs.nextInt() fs.nextInt fs a[M]=(int)1e9 a[M] a M (int)1e9 Arrays.sort(a) Arrays.sort Arrays a int cnt = 0; cnt 0 long dp[] = new long[N+1]; dp new long[N+1] N+1 N 1 dp[0] = 1 dp[0] dp 0 1 if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		} a[0]==1 a[0] a 0 1 {
			dp[1]=0;
			cnt++;
		} dp[1]=0 dp[1] dp 1 0 cnt++ cnt {
			dp[1]=1;
		} dp[1]=1 dp[1] dp 1 1 for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		} int i=1; int i=1; i 1 i<N i N i++ i++ i {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		} {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		} if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			} cnt<M&&a[cnt]==i+1 cnt<M cnt M a[cnt]==i+1 a[cnt] a cnt i+1 i 1 {
				dp[i+1]=0;
				cnt++;
			} dp[i+1]=0 dp[i+1] dp i+1 i 1 0 cnt++ cnt {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			} dp[i+1] += dp[i] dp[i+1] dp i+1 i 1 dp[i] dp i dp[i+1] %= mod dp[i+1] dp i+1 i 1 mod dp[i+1] += dp[i-1] dp[i+1] dp i+1 i 1 dp[i-1] dp i-1 i 1 dp[i+1] %= mod 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 class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

	public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
} FastScanner private BufferedReader reader = null; reader null private StringTokenizer tokenizer = null; tokenizer null public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	} FastScanner {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	} reader = new BufferedReader(new InputStreamReader(in)) reader new BufferedReader(new InputStreamReader(in)) tokenizer = null tokenizer null InputStream in in public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	} next {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	} if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(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 RuntimeException(e);
			}
		} try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			} catch (IOException e) {
				throw new RuntimeException(e);
			} IOException e {
				throw new RuntimeException(e);
			} throw new RuntimeException(e); new RuntimeException(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 String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	} nextLine {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	} if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		} tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		} try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			} catch (IOException e) {
				throw new RuntimeException(e);
			} IOException e {
				throw new RuntimeException(e);
			} throw new RuntimeException(e); new RuntimeException(e) {
				return reader.readLine();
			} return reader.readLine(); reader.readLine() reader.readLine reader return tokenizer.nextToken("\n"); tokenizer.nextToken("\n") tokenizer.nextToken tokenizer "\n" 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 int nextInt() {
		return Integer.parseInt(next());
	} nextInt {
		return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer 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 int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	} nextIntArray {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	} int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++)
			a[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextInt(); a[i] = nextInt() a[i] a i nextInt() nextInt return a; a int n n public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	} nextLongArray {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	} long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++)
			a[i] = nextLong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nextLong(); a[i] = nextLong() a[i] a i nextLong() nextLong return a; a int n n public class Main {
	static int mod = (int) 1e9 + 7;
	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	}
} public class Main {
	static int mod = (int) 1e9 + 7;
	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	static int mod = (int) 1e9 + 7;
	
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		int N = fs.nextInt(), M = fs.nextInt();
		int a[] = new int[M+1];
		for(int i=0;i<M;i++)a[i] = fs.nextInt();
		a[M]=(int)1e9;
		Arrays.sort(a);
		
		int cnt = 0;
		
		long dp[] = new long[N+1];
		dp[0] = 1;
		if(a[0]==1) {
			dp[1]=0;
			cnt++;
		}else {
			dp[1]=1;
		}
		for(int i=1;i<N;i++) {
			if(cnt<M&&a[cnt]==i+1) {
				dp[i+1]=0;
				cnt++;
			}else {
				dp[i+1] += dp[i];
				dp[i+1] %= mod;
				dp[i+1] += dp[i-1];
				dp[i+1] %= mod;
			}
		}
		System.out.println(dp[N]);
	}
}

//高速なScanner
class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

	public FastScanner(InputStream in) {
		reader = new BufferedReader(new InputStreamReader(in));
		tokenizer = null;
	}

	public String next() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}

	public String nextLine() {
		if (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				return reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken("\n");
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public int[] nextIntArray(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = nextInt();
		return a;
	}

	public long[] nextLongArray(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nextLong();
		return a;
	}
}
