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

public class  Main{
	static long[]memo;
	static int mod=(int)1e9+7;
	static boolean[]broken;
	static long dp(int i) {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	}
    public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    }
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java public class  Main{
	static long[]memo;
	static int mod=(int)1e9+7;
	static boolean[]broken;
	static long dp(int i) {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	}
    public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    }
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} Main static long[]memo; memo static int mod=(int)1e9+7; mod (int)1e9+7 (int)1e9 7 static boolean[]broken; broken static long dp(int i) {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	} dp {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	} if(i==memo.length)return 1l; i==memo.length i memo.length memo memo.length return 1l; 1l if(i>memo.length)return 0; i>memo.length i memo.length memo memo.length return 0; 0 if(memo[i]!=-1)return memo[i]; memo[i]!=-1 memo[i] memo i -1 1 return memo[i]; memo[i] memo i if(broken[i]) {
			return memo[i]=0;
		} broken[i] broken i {
			return memo[i]=0;
		} return memo[i]=0; memo[i]=0 memo[i] memo i 0 return memo[i]=(dp(i+1)+dp(i+2))%mod; memo[i]=(dp(i+1)+dp(i+2))%mod memo[i] memo 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 int i i public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    } main {
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    } MScanner sc = new MScanner(System.in); sc new MScanner(System.in) PrintWriter pw=new PrintWriter(System.out); pw new PrintWriter(System.out) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc int m=sc.nextInt(); m sc.nextInt() sc.nextInt sc broken=new boolean[1000000] broken new boolean[1000000] 1000000 for(int i=0;i<m;i++)broken[sc.nextInt()]=true; int i=0; int i=0; i 0 i<m i m i++ i++ i broken[sc.nextInt()]=true; broken[sc.nextInt()]=true broken[sc.nextInt()] broken sc.nextInt() sc.nextInt sc true memo=new long[n] memo new long[n] n Arrays.fill(memo, -1) Arrays.fill Arrays memo -1 1 pw.println(dp(0)) pw.println pw dp(0) dp 0 pw.flush() pw.flush pw String[] args args static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	} MScanner StringTokenizer st; st BufferedReader br; br public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		} MScanner {
			br = new BufferedReader(new InputStreamReader(system));
		} br = new BufferedReader(new InputStreamReader(system)) br new BufferedReader(new InputStreamReader(system)) InputStream system system public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		} MScanner {
			br = new BufferedReader(new FileReader(file));
		} br = new BufferedReader(new FileReader(file)) br new BufferedReader(new FileReader(file)) String file file public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} next {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		} while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st public String nextLine() throws IOException {
			return br.readLine();
		} nextLine {
			return br.readLine();
		} return br.readLine(); br.readLine() br.readLine br public int nextInt() throws IOException {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		} nextDouble {
			return Double.parseDouble(next());
		} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public char nextChar() throws IOException {
			return next().charAt(0);
		} nextChar {
			return next().charAt(0);
		} return next().charAt(0); next().charAt(0) next().charAt next() next 0 public Long nextLong() throws IOException {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public boolean ready() throws IOException {
			return br.ready();
		} ready {
			return br.ready();
		} return br.ready(); br.ready() br.ready br public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		} waitForInput {
			Thread.sleep(3000);
		} Thread.sleep(3000) Thread.sleep Thread 3000 public class  Main{
	static long[]memo;
	static int mod=(int)1e9+7;
	static boolean[]broken;
	static long dp(int i) {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	}
    public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    }
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} public class  Main{
	static long[]memo;
	static int mod=(int)1e9+7;
	static boolean[]broken;
	static long dp(int i) {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	}
    public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    }
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
} Main
import java.io.*;
import java.util.*;

public class  Main{
	static long[]memo;
	static int mod=(int)1e9+7;
	static boolean[]broken;
	static long dp(int i) {
		if(i==memo.length)return 1l;
		if(i>memo.length)return 0;
		if(memo[i]!=-1)return memo[i];
		if(broken[i]) {
			return memo[i]=0;
		}
		return memo[i]=(dp(i+1)+dp(i+2))%mod;
	}
    public static void main(String[] args) throws Exception{
        //MScanner sc = new MScanner("chess.in");
        MScanner sc = new MScanner(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        int n=sc.nextInt();
        int m=sc.nextInt();
        broken=new boolean[1000000];
        for(int i=0;i<m;i++)broken[sc.nextInt()]=true;
        memo=new long[n];Arrays.fill(memo, -1);
        pw.println(dp(0));
        pw.flush();
    }
    static class MScanner {
		StringTokenizer st;
		BufferedReader br;
 
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
 
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}