import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.AbstractMap;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.util.Comparator.*;				

public class Main {
	
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    }
    
    // ======================================================================

    static class Solver {
    	MyInput in;
    	PrintWriter out;
        public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        }
        // -----------------------------------------
        int MOD = 1000000007;
    	long[] dp;
        public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        }
        
        // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        }
        void prn(int i) {
        	out.println(i);
        }
        void prn(long i) {
        	out.println(i);
        }
        void prr(String s) {
        	out.print(s);
        }
        int ni() {
        	return in.nextInt();
        }
        long nl() {
        	return in.nextLong();
        }
        String ns() {
        	return in.nextString();
        }
        int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        }
        long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        }
        String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        }
        int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        }
        long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        }
    }

    static class PP{
    	public int key, val;
    	public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	}
		public int getKey() {
			return key;
		}
		public void setKey(int key) {
			this.key = key;
		}
		public int getVal() {
			return val;
		}
		public void setVal(int val) {
			this.val = val;
		}
    }
    static class PPL {
    	public long key, val;
    	public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long getVal() {
			return val;
		}
		public void setVal(long val) {
			this.val = val;
		}
    }
    static class PPDL {
    	public long key;
    	public long[] val;
    	public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long[] getVal() {
			return val;
		}
		public void setVal(long[] val) {
			this.val = val;
		}
		public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		}
    }
    // ======================================================================
    static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
        /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L;

        public Pair(final K key, final V value) {
            super(key, value);
        }
     }
    static class MyInput {
        private final BufferedReader in;
        private static int pos;
        private static int readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static char[] str = new char[500 * 8 * 2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];
 
        static {
            for (int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }
 
        public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        }
 
        public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        }
 
        public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
        public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
       public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        }
 
        public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        }
 
        public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        }
 
        int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        }
 
        static class EndOfFileRuntimeException extends RuntimeException {
        }
    }
} 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.OutputStream; OutputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.math.BigDecimal; BigDecimal java.math import java.text.DecimalFormat; DecimalFormat java.text import java.util.AbstractMap; AbstractMap java.util import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.PriorityQueue; PriorityQueue java.util import java.util.Queue; Queue java.util import java.util.Set; Set java.util import java.util.TreeMap; TreeMap java.util import java.util.TreeSet; TreeSet java.util import static java.util.Comparator.*; import static java.util.Comparator.*; import static java.util.Comparator.*; public class Main {
	
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    }
    
    // ======================================================================

    static class Solver {
    	MyInput in;
    	PrintWriter out;
        public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        }
        // -----------------------------------------
        int MOD = 1000000007;
    	long[] dp;
        public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        }
        
        // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        }
        void prn(int i) {
        	out.println(i);
        }
        void prn(long i) {
        	out.println(i);
        }
        void prr(String s) {
        	out.print(s);
        }
        int ni() {
        	return in.nextInt();
        }
        long nl() {
        	return in.nextLong();
        }
        String ns() {
        	return in.nextString();
        }
        int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        }
        long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        }
        String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        }
        int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        }
        long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        }
    }

    static class PP{
    	public int key, val;
    	public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	}
		public int getKey() {
			return key;
		}
		public void setKey(int key) {
			this.key = key;
		}
		public int getVal() {
			return val;
		}
		public void setVal(int val) {
			this.val = val;
		}
    }
    static class PPL {
    	public long key, val;
    	public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long getVal() {
			return val;
		}
		public void setVal(long val) {
			this.val = val;
		}
    }
    static class PPDL {
    	public long key;
    	public long[] val;
    	public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long[] getVal() {
			return val;
		}
		public void setVal(long[] val) {
			this.val = val;
		}
		public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		}
    }
    // ======================================================================
    static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
        /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L;

        public Pair(final K key, final V value) {
            super(key, value);
        }
     }
    static class MyInput {
        private final BufferedReader in;
        private static int pos;
        private static int readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static char[] str = new char[500 * 8 * 2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];
 
        static {
            for (int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }
 
        public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        }
 
        public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        }
 
        public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
        public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
       public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        }
 
        public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        }
 
        public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        }
 
        int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        }
 
        static class EndOfFileRuntimeException extends RuntimeException {
        }
    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out MyInput in = new MyInput(inputStream); in new MyInput(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Solver solver = new Solver(in, out); solver new Solver(in, out) solver.solve() solver.solve solver out.close() out.close out String[] args args static class Solver {
    	MyInput in;
    	PrintWriter out;
        public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        }
        // -----------------------------------------
        int MOD = 1000000007;
    	long[] dp;
        public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        }
        
        // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        }
        void prn(int i) {
        	out.println(i);
        }
        void prn(long i) {
        	out.println(i);
        }
        void prr(String s) {
        	out.print(s);
        }
        int ni() {
        	return in.nextInt();
        }
        long nl() {
        	return in.nextLong();
        }
        String ns() {
        	return in.nextString();
        }
        int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        }
        long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        }
        String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        }
        int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        }
        long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        }
    } Solver MyInput in; in PrintWriter out; out // -----------------------------------------
        int MOD = 1000000007; MOD 1000000007 long[] dp; dp public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        } Solver {
        	this.in = in;
        	this.out = out;
        } this.in = in this.in this this.in in this.out = out this.out this this.out out MyInput in in PrintWriter out out public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        } solve {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        } int N = ni(); N ni() ni int M = ni(); M ni() ni int[] A = ndi(M); A ndi(M) ndi M dp = new long[N+2] dp new long[N+2] N+2 N 2 dp[0] = dp[1] = 1 dp[0] dp 0 dp[1] = 1 dp[1] dp 1 1 for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	} int i=0; int i=0; i 0 i < M i M i++ i++ i {
        		dp[A[i]] = -1;
        	} {
        		dp[A[i]] = -1;
        	} dp[A[i]] = -1 dp[A[i]] dp A[i] A i -1 1 for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	} int i = 0; int i = 0; i 0 i <= N i N i++ i++ i {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	} {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	} if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} dp[i] == -1 dp[i] dp i -1 1 {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} dp[i] = 0 dp[i] dp i 0 if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} i >= 2 i 2 {
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} dp[i] = (dp[i-2] + dp[i-1]) % MOD dp[i] dp i (dp[i-2] + dp[i-1]) % MOD (dp[i-2] + dp[i-1]) dp[i-2] dp i-2 i 2 dp[i-1] dp i-1 i 1 MOD prn(dp[N]) prn dp[N] dp N // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        } prn {
        	out.println(s);
        } out.println(s) out.println out s String s s void prn(int i) {
        	out.println(i);
        } prn {
        	out.println(i);
        } out.println(i) out.println out i int i i void prn(long i) {
        	out.println(i);
        } prn {
        	out.println(i);
        } out.println(i) out.println out i long i i void prr(String s) {
        	out.print(s);
        } prr {
        	out.print(s);
        } out.print(s) out.print out s String s s int ni() {
        	return in.nextInt();
        } ni {
        	return in.nextInt();
        } return in.nextInt(); in.nextInt() in.nextInt in long nl() {
        	return in.nextLong();
        } nl {
        	return in.nextLong();
        } return in.nextLong(); in.nextLong() in.nextLong in String ns() {
        	return in.nextString();
        } ns {
        	return in.nextString();
        } return in.nextString(); in.nextString() in.nextString in int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        } ndi {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        } int[] ans = new int[n]; ans new int[n] n for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	} int i=0; int i=0; i 0 i < n i n i++ i++ i {
        		ans[i] = ni();
        	} {
        		ans[i] = ni();
        	} ans[i] = ni() ans[i] ans i ni() ni return ans; ans int n n long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        } ndl {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        } long[] ans = new long[n]; ans new long[n] n for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	} int i=0; int i=0; i 0 i < n i n i++ i++ i {
        		ans[i] = nl();
        	} {
        		ans[i] = nl();
        	} ans[i] = nl() ans[i] ans i nl() nl return ans; ans int n n String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        } nds {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        } String[] ans = new String[n]; ans new String[n] n for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	} int i=0; int i=0; i 0 i < n i n i++ i++ i {
        		ans[i] = ns();
        	} {
        		ans[i] = ns();
        	} ans[i] = ns() ans[i] ans i ns() ns return ans; ans int n n int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        } nddi {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        } int[][] ans = new int[n][m]; ans new int[n][m] n m for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	} int i=0; int i=0; i 0 i < n i n i++ i++ i {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	} {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	} for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	} int j=0; int j=0; j 0 j < m j m j++ j++ j {
            		ans[i][j] = ni();
            	} {
            		ans[i][j] = ni();
            	} ans[i][j] = ni() ans[i][j] ans[i] ans i j ni() ni return ans; ans int n n int m m long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        } nddl {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        } long[][] ans = new long[n][m]; ans new long[n][m] n m for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	} int i=0; int i=0; i 0 i < n i n i++ i++ i {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	} {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	} for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	} int j=0; int j=0; j 0 j < m j m j++ j++ j {
            		ans[i][j] = nl();
            	} {
            		ans[i][j] = nl();
            	} ans[i][j] = nl() ans[i][j] ans[i] ans i j nl() nl return ans; ans int n n int m m static class PP{
    	public int key, val;
    	public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	}
		public int getKey() {
			return key;
		}
		public void setKey(int key) {
			this.key = key;
		}
		public int getVal() {
			return val;
		}
		public void setVal(int val) {
			this.val = val;
		}
    } PP public int key key val; val public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	} PP {
    		this.key = key;
    		this.val = val;
    	} this.key = key this.key this this.key key this.val = val this.val this this.val val int key key int val val public int getKey() {
			return key;
		} getKey {
			return key;
		} return key; key public void setKey(int key) {
			this.key = key;
		} setKey {
			this.key = key;
		} this.key = key this.key this this.key key int key key public int getVal() {
			return val;
		} getVal {
			return val;
		} return val; val public void setVal(int val) {
			this.val = val;
		} setVal {
			this.val = val;
		} this.val = val this.val this this.val val int val val static class PPL {
    	public long key, val;
    	public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long getVal() {
			return val;
		}
		public void setVal(long val) {
			this.val = val;
		}
    } PPL public long key key val; val public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	} PPL {
    		this.key = key;
    		this.val = val;
    	} this.key = key this.key this this.key key this.val = val this.val this this.val val long key key long val val public long getKey() {
			return key;
		} getKey {
			return key;
		} return key; key public void setKey(long key) {
			this.key = key;
		} setKey {
			this.key = key;
		} this.key = key this.key this this.key key long key key public long getVal() {
			return val;
		} getVal {
			return val;
		} return val; val public void setVal(long val) {
			this.val = val;
		} setVal {
			this.val = val;
		} this.val = val this.val this this.val val long val val static class PPDL {
    	public long key;
    	public long[] val;
    	public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long[] getVal() {
			return val;
		}
		public void setVal(long[] val) {
			this.val = val;
		}
		public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		}
    } PPDL public long key; key public long[] val; val public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	} PPDL {
    		this.key = key;
    		this.val = val;
    	} this.key = key this.key this this.key key this.val = val this.val this this.val val long key key long[] val val public long getKey() {
			return key;
		} getKey {
			return key;
		} return key; key public void setKey(long key) {
			this.key = key;
		} setKey {
			this.key = key;
		} this.key = key this.key this this.key key long key key public long[] getVal() {
			return val;
		} getVal {
			return val;
		} return val; val public void setVal(long[] val) {
			this.val = val;
		} setVal {
			this.val = val;
		} this.val = val this.val this this.val val long[] val val public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		} dump {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		} out.print("key = " + key + "  val ") out.print out "key = " + key + "  val " "key = " + key + "  val " "key = " key "  val " for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			} int i=0; int i=0; i 0 i < val.length i val.length val val.length i++ i++ i {
				out.print("[" + val[i] + "] ");
			} {
				out.print("[" + val[i] + "] ");
			} out.print("[" + val[i] + "] ") out.print out "[" + val[i] + "] " "[" + val[i] + "] " "[" val[i] val i "] " out.println("") out.println out "" PrintWriter out out static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
        /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L;

        public Pair(final K key, final V value) {
            super(key, value);
        }
     } Pair /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L; serialVersionUID 6411527075103472113L public Pair(final K key, final V value) {
            super(key, value);
        } Pair {
            super(key, value);
        } super(key, value) super key value final K key key final V value value SimpleEntry static class MyInput {
        private final BufferedReader in;
        private static int pos;
        private static int readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static char[] str = new char[500 * 8 * 2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];
 
        static {
            for (int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }
 
        public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        }
 
        public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        }
 
        public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
        public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
       public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        }
 
        public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        }
 
        public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        }
 
        int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        }
 
        static class EndOfFileRuntimeException extends RuntimeException {
        }
    } MyInput private final BufferedReader in; in private static int pos; pos private static int readLen; readLen private static final char[] buffer = new char[1024 * 8]; buffer new char[1024 * 8] 1024 * 8 1024 8 private static char[] str = new char[500 * 8 * 2]; str new char[500 * 8 * 2] 500 * 8 * 2 500 * 8 * 2 500 8 2 private static boolean[] isDigit = new boolean[256]; isDigit new boolean[256] 256 private static boolean[] isSpace = new boolean[256]; isSpace new boolean[256] 256 private static boolean[] isLineSep = new boolean[256]; isLineSep new boolean[256] 256 public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        } MyInput {
            in = new BufferedReader(new InputStreamReader(is));
        } in = new BufferedReader(new InputStreamReader(is)) in new BufferedReader(new InputStreamReader(is)) InputStream is is public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        } read {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        } if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            } pos >= readLen pos readLen {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            } pos = 0 pos 0 try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                } catch (IOException e) {
                    throw new RuntimeException();
                } IOException e {
                    throw new RuntimeException();
                } throw new RuntimeException(); new RuntimeException() {
                    readLen = in.read(buffer);
                } readLen = in.read(buffer) readLen in.read(buffer) in.read in buffer if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                } readLen <= 0 readLen 0 {
                    throw new MyInput.EndOfFileRuntimeException();
                } throw new MyInput.EndOfFileRuntimeException(); new MyInput.EndOfFileRuntimeException() return buffer[pos++]; buffer[pos++] buffer pos++ pos public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        } nextInt {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        } int len = 0; len 0 str[len++] = nextChar() str[len++] str len++ len nextChar() nextChar len = reads(len, isSpace) len reads(len, isSpace) reads len isSpace int i = 0; i 0 int ret = 0; ret 0 if (str[0] == '-') {
                i = 1;
            } str[0] == '-' str[0] str 0 '-' {
                i = 1;
            } i = 1 i 1 for (; i < len; i++) ret = ret * 10 + str[i] - '0'; ; i < len i len i++ i++ i ret = ret * 10 + str[i] - '0'; ret = ret * 10 + str[i] - '0' ret ret * 10 + str[i] - '0' ret * 10 + str[i] ret * 10 ret 10 str[i] str i '0' if (str[0] == '-') {
                ret = -ret;
            } str[0] == '-' str[0] str 0 '-' {
                ret = -ret;
            } ret = -ret ret -ret ret return ret; ret public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        } nextLong {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        } int len = 0; len 0 str[len++] = nextChar() str[len++] str len++ len nextChar() nextChar len = reads(len, isSpace) len reads(len, isSpace) reads len isSpace int i = 0; i 0 long ret = 0L; ret 0L if (str[0] == '-') {
                i = 1;
            } str[0] == '-' str[0] str 0 '-' {
                i = 1;
            } i = 1 i 1 for (; i < len; i++) ret = ret * 10 + str[i] - '0'; ; i < len i len i++ i++ i ret = ret * 10 + str[i] - '0'; ret = ret * 10 + str[i] - '0' ret ret * 10 + str[i] - '0' ret * 10 + str[i] ret * 10 ret 10 str[i] str i '0' if (str[0] == '-') {
                ret = -ret;
            } str[0] == '-' str[0] str 0 '-' {
                ret = -ret;
            } ret = -ret ret -ret ret return ret; ret public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        } nextString {
        	String ret = new String(nextDChar()).trim();
            return ret;
        } String ret = new String(nextDChar()).trim(); ret new String(nextDChar()).trim() new String(nextDChar()).trim new String(nextDChar()) return ret; ret public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        } nextDChar {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        } int len = 0; len 0 len = reads(len, isSpace) len reads(len, isSpace) reads len isSpace char[] ret = new char[len + 1]; ret new char[len + 1] len + 1 len 1 for (int i=0; i < len; i++)		ret[i] = str[i]; int i=0; int i=0; i 0 i < len i len i++ i++ i ret[i] = str[i]; ret[i] = str[i] ret[i] ret i str[i] str i ret[len] = 0x00 ret[len] ret len 0x00 return ret; ret public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        } nextChar {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        } while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            } true {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            } final int c = read(); c read() read if (!isSpace[c]) {
                    return (char) c;
                } !isSpace[c] isSpace[c] isSpace c {
                    return (char) c;
                } return (char) c; (char) c int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        } reads {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        } try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            } catch (MyInput.EndOfFileRuntimeException e) {
            } MyInput.EndOfFileRuntimeException e {
            } {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                } true {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                } final int c = read(); c read() read if (accept[c]) {
                        break;
                    } accept[c] accept c {
                        break;
                    } break; if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    } str.length == len str.length str str.length len {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    } char[] rep = new char[str.length * 3 / 2]; rep new char[str.length * 3 / 2] str.length * 3 / 2 str.length * 3 str.length str str.length 3 2 System.arraycopy(str, 0, rep, 0, str.length) System.arraycopy System str 0 rep 0 str.length str str.length str = rep str rep str[len++] = (char) c str[len++] str len++ len (char) c return len; len int len len boolean[] accept accept static class EndOfFileRuntimeException extends RuntimeException {
        } EndOfFileRuntimeException RuntimeException public class Main {
	
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    }
    
    // ======================================================================

    static class Solver {
    	MyInput in;
    	PrintWriter out;
        public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        }
        // -----------------------------------------
        int MOD = 1000000007;
    	long[] dp;
        public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        }
        
        // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        }
        void prn(int i) {
        	out.println(i);
        }
        void prn(long i) {
        	out.println(i);
        }
        void prr(String s) {
        	out.print(s);
        }
        int ni() {
        	return in.nextInt();
        }
        long nl() {
        	return in.nextLong();
        }
        String ns() {
        	return in.nextString();
        }
        int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        }
        long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        }
        String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        }
        int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        }
        long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        }
    }

    static class PP{
    	public int key, val;
    	public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	}
		public int getKey() {
			return key;
		}
		public void setKey(int key) {
			this.key = key;
		}
		public int getVal() {
			return val;
		}
		public void setVal(int val) {
			this.val = val;
		}
    }
    static class PPL {
    	public long key, val;
    	public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long getVal() {
			return val;
		}
		public void setVal(long val) {
			this.val = val;
		}
    }
    static class PPDL {
    	public long key;
    	public long[] val;
    	public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long[] getVal() {
			return val;
		}
		public void setVal(long[] val) {
			this.val = val;
		}
		public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		}
    }
    // ======================================================================
    static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
        /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L;

        public Pair(final K key, final V value) {
            super(key, value);
        }
     }
    static class MyInput {
        private final BufferedReader in;
        private static int pos;
        private static int readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static char[] str = new char[500 * 8 * 2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];
 
        static {
            for (int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }
 
        public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        }
 
        public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        }
 
        public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
        public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
       public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        }
 
        public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        }
 
        public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        }
 
        int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        }
 
        static class EndOfFileRuntimeException extends RuntimeException {
        }
    }
} public class Main {
	
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    }
    
    // ======================================================================

    static class Solver {
    	MyInput in;
    	PrintWriter out;
        public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        }
        // -----------------------------------------
        int MOD = 1000000007;
    	long[] dp;
        public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        }
        
        // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        }
        void prn(int i) {
        	out.println(i);
        }
        void prn(long i) {
        	out.println(i);
        }
        void prr(String s) {
        	out.print(s);
        }
        int ni() {
        	return in.nextInt();
        }
        long nl() {
        	return in.nextLong();
        }
        String ns() {
        	return in.nextString();
        }
        int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        }
        long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        }
        String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        }
        int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        }
        long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        }
    }

    static class PP{
    	public int key, val;
    	public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	}
		public int getKey() {
			return key;
		}
		public void setKey(int key) {
			this.key = key;
		}
		public int getVal() {
			return val;
		}
		public void setVal(int val) {
			this.val = val;
		}
    }
    static class PPL {
    	public long key, val;
    	public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long getVal() {
			return val;
		}
		public void setVal(long val) {
			this.val = val;
		}
    }
    static class PPDL {
    	public long key;
    	public long[] val;
    	public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long[] getVal() {
			return val;
		}
		public void setVal(long[] val) {
			this.val = val;
		}
		public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		}
    }
    // ======================================================================
    static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
        /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L;

        public Pair(final K key, final V value) {
            super(key, value);
        }
     }
    static class MyInput {
        private final BufferedReader in;
        private static int pos;
        private static int readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static char[] str = new char[500 * 8 * 2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];
 
        static {
            for (int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }
 
        public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        }
 
        public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        }
 
        public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
        public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
       public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        }
 
        public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        }
 
        public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        }
 
        int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        }
 
        static class EndOfFileRuntimeException extends RuntimeException {
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.AbstractMap;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.util.Comparator.*;				

public class Main {
	
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyInput in = new MyInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        
        Solver solver = new Solver(in, out);
        solver.solve();
        
        out.close();
    }
    
    // ======================================================================

    static class Solver {
    	MyInput in;
    	PrintWriter out;
        public Solver(MyInput in, PrintWriter out) {
        	this.in = in;
        	this.out = out;
        }
        // -----------------------------------------
        int MOD = 1000000007;
    	long[] dp;
        public void solve() {
        	int N = ni();
        	int M = ni();
        	int[] A = ndi(M);
        	dp = new long[N+2];
        	dp[0] = dp[1] = 1;
        	for(int i=0; i < M; i++) {
        		dp[A[i]] = -1;
        	}
        	for(int i = 0; i <= N; i++) {
        		if(dp[i] == -1) {
        			dp[i] = 0;
//        			prn("dp[" + i + "] = " + dp[i]);
        		} else if(i >= 2){
        			dp[i] = (dp[i-2] + dp[i-1]) % MOD;
//        			prn("dp[" + i + "] = " + dp[i]);
        		}
        	}
        	prn(dp[N]);
        }
        
        // -----------------------------------------
        void prn(String s) {
        	out.println(s);
        }
        void prn(int i) {
        	out.println(i);
        }
        void prn(long i) {
        	out.println(i);
        }
        void prr(String s) {
        	out.print(s);
        }
        int ni() {
        	return in.nextInt();
        }
        long nl() {
        	return in.nextLong();
        }
        String ns() {
        	return in.nextString();
        }
        int[] ndi(int n) {
        	int[] ans = new int[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ni();
        	}
        	return ans;
        }
        long[] ndl(int n) {
        	long[] ans = new long[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = nl();
        	}
        	return ans;
        }
        String[] nds(int n) {
        	String[] ans = new String[n];
        	for(int i=0; i < n; i++) {
        		ans[i] = ns();
        	}
        	return ans;
        }
        int[][] nddi(int n, int m) {
        	int[][] ans = new int[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = ni();
            	}
        	}
        	return ans;
        }
        long[][] nddl(int n, int m) {
        	long[][] ans = new long[n][m];
        	for(int i=0; i < n; i++) {
            	for(int j=0; j < m; j++) {
            		ans[i][j] = nl();
            	}
        	}
        	return ans;
        }
    }

    static class PP{
    	public int key, val;
    	public PP(int key, int val) {
    		this.key = key;
    		this.val = val;
    	}
		public int getKey() {
			return key;
		}
		public void setKey(int key) {
			this.key = key;
		}
		public int getVal() {
			return val;
		}
		public void setVal(int val) {
			this.val = val;
		}
    }
    static class PPL {
    	public long key, val;
    	public PPL(long key, long val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long getVal() {
			return val;
		}
		public void setVal(long val) {
			this.val = val;
		}
    }
    static class PPDL {
    	public long key;
    	public long[] val;
    	public PPDL(long key, long[] val) {
    		this.key = key;
    		this.val = val;
    	}
		public long getKey() {
			return key;
		}
		public void setKey(long key) {
			this.key = key;
		}
		public long[] getVal() {
			return val;
		}
		public void setVal(long[] val) {
			this.val = val;
		}
		public void dump(PrintWriter out) {
			out.print("key = " + key + "  val ");
			for(int i=0; i < val.length; i++) {
				out.print("[" + val[i] + "] ");
			}
			out.println("");
		}
    }
    // ======================================================================
    static class Pair<K, V> extends AbstractMap.SimpleEntry<K, V> {
        /** serialVersionUID. */
        private static final long serialVersionUID = 6411527075103472113L;

        public Pair(final K key, final V value) {
            super(key, value);
        }
     }
    static class MyInput {
        private final BufferedReader in;
        private static int pos;
        private static int readLen;
        private static final char[] buffer = new char[1024 * 8];
        private static char[] str = new char[500 * 8 * 2];
        private static boolean[] isDigit = new boolean[256];
        private static boolean[] isSpace = new boolean[256];
        private static boolean[] isLineSep = new boolean[256];
 
        static {
            for (int i = 0; i < 10; i++) {
                isDigit['0' + i] = true;
            }
            isDigit['-'] = true;
            isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
            isLineSep['\r'] = isLineSep['\n'] = true;
        }
 
        public MyInput(InputStream is) {
            in = new BufferedReader(new InputStreamReader(is));
        }
 
        public int read() {
            if (pos >= readLen) {
                pos = 0;
                try {
                    readLen = in.read(buffer);
                } catch (IOException e) {
                    throw new RuntimeException();
                }
                if (readLen <= 0) {
                    throw new MyInput.EndOfFileRuntimeException();
                }
            }
            return buffer[pos++];
        }
 
        public int nextInt() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            int ret = 0;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
        public long nextLong() {
            int len = 0;
            str[len++] = nextChar();
            len = reads(len, isSpace);
            int i = 0;
            long ret = 0L;
            if (str[0] == '-') {
                i = 1;
            }
            for (; i < len; i++) ret = ret * 10 + str[i] - '0';
            if (str[0] == '-') {
                ret = -ret;
            }
            return ret;
        }
 
       public String nextString() {
        	String ret = new String(nextDChar()).trim();
            return ret;
        }
 
        public char[] nextDChar() {
            int len = 0;
            len = reads(len, isSpace);
            char[] ret = new char[len + 1];
            for (int i=0; i < len; i++)		ret[i] = str[i];
            ret[len] = 0x00;
            return ret;
        }
 
        public char nextChar() {
            while (true) {
                final int c = read();
                if (!isSpace[c]) {
                    return (char) c;
                }
            }
        }
 
        int reads(int len, boolean[] accept) {
            try {
                while (true) {
                    final int c = read();
                    if (accept[c]) {
                        break;
                    }
                    if (str.length == len) {
                        char[] rep = new char[str.length * 3 / 2];
                        System.arraycopy(str, 0, rep, 0, str.length);
                        str = rep;
                    }
                    str[len++] = (char) c;
                }
            } catch (MyInput.EndOfFileRuntimeException e) {
            }
            return len;
        }
 
        static class EndOfFileRuntimeException extends RuntimeException {
        }
    }
}
