

import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Stack;

public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final int MAX = (int) 1e6;
    public static List<Pair>[] edges;
    public static int[][] parent;
    public static int col = 20;
    public static long[] Bit;
    public static long[] fac,inv;
    public  static int[] prime; 
    public static long[] dp;
	public static FastReader sc = new FastReader();
	public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	}

	
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	}
	
} import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.util.Stack; Stack java.util public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final int MAX = (int) 1e6;
    public static List<Pair>[] edges;
    public static int[][] parent;
    public static int col = 20;
    public static long[] Bit;
    public static long[] fac,inv;
    public  static int[] prime; 
    public static long[] dp;
	public static FastReader sc = new FastReader();
	public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	}

	
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	}
	
} Main public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out)); out new PrintWriter (new BufferedOutputStream(System.out)) static int mod = (int) (1e9+7); mod (int) (1e9+7) 1e9 7 static long cf = 998244353; cf 998244353 static final int MAX = (int) 1e6; MAX (int) 1e6 public static List<Pair>[] edges; edges public static int[][] parent; parent public static int col = 20; col 20 public static long[] Bit; Bit public static long[] fac fac inv; inv public  static int[] prime; prime public static long[] dp; dp public static FastReader sc = new FastReader(); sc new FastReader() public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	} main {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	} int n = sc.nextInt() n sc.nextInt() sc.nextInt sc m=sc.nextInt(); m sc.nextInt() sc.nextInt sc boolean[] vis = new boolean[n+1]; vis new boolean[n+1] n+1 n 1 for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
		int idx = sc.nextInt();
		vis[idx]=true;
		} {
		int idx = sc.nextInt();
		vis[idx]=true;
		} int idx = sc.nextInt(); idx sc.nextInt() sc.nextInt sc vis[idx]=true vis[idx] vis idx true dp = new long[n+1] dp new long[n+1] n+1 n 1 dp[0]=1 dp[0] dp 0 1 if(!vis[1])
		dp[1]=1; !vis[1] vis[1] vis 1 dp[1]=1 dp[1] dp 1 1 for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		} int i=2; int i=2; i 2 i<=n i n i++ i++ i {
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		} {
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		} if(vis[i])
			continue; vis[i] vis i continue; dp[i]=(dp[i-1]+dp[i-2])%mod dp[i] dp i (dp[i-1]+dp[i-2])%mod (dp[i-1]+dp[i-2]) dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 mod out.print(dp[n]) out.print out dp[n] dp n out.close() out.close out String[] args args public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	} FastReader BufferedReader br; br StringTokenizer root; root public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		} FastReader {
			br = new BufferedReader(new InputStreamReader(System.in));
		} br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		} next {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		} while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			} root == null || !root.hasMoreTokens() root == null root null !root.hasMoreTokens() root.hasMoreTokens() root.hasMoreTokens root {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			} try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				} catch (Exception r) {
					r.printStackTrace();
				} Exception r {
					r.printStackTrace();
				} r.printStackTrace() r.printStackTrace r {
					root = new StringTokenizer(br.readLine());
				} root = new StringTokenizer(br.readLine()) root new StringTokenizer(br.readLine()) return root.nextToken(); root.nextToken() root.nextToken root int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next double nextDouble() {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		} nextLine {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		} String str = ""; str "" try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			} catch (Exception r) {
				r.printStackTrace();
			} Exception r {
				r.printStackTrace();
			} r.printStackTrace() r.printStackTrace r {
				str = br.readLine();
			} str = br.readLine() str br.readLine() br.readLine br return str; str static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	} Pair int x; x int y; y Pair(int x,int y){
			this.x = x;
			this.y = y;
		} Pair {
			this.x = x;
			this.y = y;
		} this.x = x this.x this this.x x this.y = y this.y this this.y y int x x int y y public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final int MAX = (int) 1e6;
    public static List<Pair>[] edges;
    public static int[][] parent;
    public static int col = 20;
    public static long[] Bit;
    public static long[] fac,inv;
    public  static int[] prime; 
    public static long[] dp;
	public static FastReader sc = new FastReader();
	public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	}

	
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	}
	
} public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final int MAX = (int) 1e6;
    public static List<Pair>[] edges;
    public static int[][] parent;
    public static int col = 20;
    public static long[] Bit;
    public static long[] fac,inv;
    public  static int[] prime; 
    public static long[] dp;
	public static FastReader sc = new FastReader();
	public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	}

	
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	}
	
} Main


import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Stack;

public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final int MAX = (int) 1e6;
    public static List<Pair>[] edges;
    public static int[][] parent;
    public static int col = 20;
    public static long[] Bit;
    public static long[] fac,inv;
    public  static int[] prime; 
    public static long[] dp;
	public static FastReader sc = new FastReader();
	public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt(),m=sc.nextInt();
		boolean[] vis = new boolean[n+1];
		for(int i=0;i<m;i++){
		int idx = sc.nextInt();
		vis[idx]=true;
		}
		dp = new long[n+1];
		dp[0]=1;
		if(!vis[1])
		dp[1]=1;
		for(int i=2;i<=n;i++){
			if(vis[i])
			continue;
			dp[i]=(dp[i-1]+dp[i-2])%mod;
		}
		 out.print(dp[n]);
		out.close();
	}

	
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	}
	
}