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

public class Main {
	private static void solve(){
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	}

    //Switch input source (stdin/file)
	private static BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args){
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	}

    //Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
    //Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
    //Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
    //Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
    //Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
    //Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	private static void solve(){
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	}

    //Switch input source (stdin/file)
	private static BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args){
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	}

    //Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
    //Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
    //Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
    //Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
    //Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
    //Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
} Main //Switch input source (stdin/file)
	private static BufferedReader br  = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) //Input read utility
	private static StringTokenizer tokenizer = null; tokenizer null private static void solve(){
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	} solve {
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	} int n = ni(); n ni() ni int m = ni(); m ni() ni boolean[] broken = new boolean[n + 1]; broken new boolean[n + 1] n + 1 n 1 for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		} int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
			broken[ni()] = true;
		} {
			broken[ni()] = true;
		} broken[ni()] = true broken[ni()] broken ni() ni true int[] dp = new int[n + 1]; dp new int[n + 1] n + 1 n 1 dp[0] = 1 dp[0] dp 0 1 int mod = 1000000007; mod 1000000007 if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		} n <= 1 n 1 {
			System.out.println(1);
		} System.out.println(1) System.out.println System.out System System.out 1 {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		} dp[1] = broken[1] ? 0 : 1 dp[1] dp 1 broken[1] ? 0 : 1 broken[1] broken 1 0 1 for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			} int i = 2; int i = 2; i 2 i < n i n i++ i++ i {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			} {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			} dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod dp[i] dp i broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod broken[i] broken i 0 ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod ((dp[i - 2]%mod) + (dp[i - 1]%mod)) (dp[i - 2]%mod) dp[i - 2] dp i - 2 i 2 mod (dp[i - 1]%mod) dp[i - 1] dp i - 1 i 1 mod mod System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod) System.out.println System.out System System.out ((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod ((dp[n - 2]%mod) + (dp[n - 1]%mod)) (dp[n - 2]%mod) dp[n - 2] dp n - 2 n 2 mod (dp[n - 1]%mod) dp[n - 1] dp n - 1 n 1 mod mod public static void main(String[] args){
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	} main {
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	} String debugDataPath = System.getenv("DD_PATH"); debugDataPath System.getenv("DD_PATH") System.getenv System "DD_PATH" if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        } debugDataPath != null debugDataPath null {
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        } try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            } catch(Exception e){
                throw new RuntimeException(e);
            } Exception e {
                throw new RuntimeException(e);
            } throw new RuntimeException(e); new RuntimeException(e) {
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            } br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath)))) br new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath)))) solve() solve String[] args args public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	} next {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	} while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		} tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		} try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			} catch (Exception e) {
				throw new RuntimeException(e);
			} Exception e {
				throw new RuntimeException(e);
			} throw new RuntimeException(e); new RuntimeException(e) {
				tokenizer = new StringTokenizer(br.readLine());
			} tokenizer = new StringTokenizer(br.readLine()) tokenizer new StringTokenizer(br.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer //Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	} ni {
		return Integer.parseInt(next());
	} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next //Get next single long
	private static long nl() {
		return Long.parseLong(next());
	} nl {
		return Long.parseLong(next());
	} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next //Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	} nd {
		return Double.parseDouble(next());
	} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next //Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	} na {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	} int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++)
			a[i] = ni(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = ni(); a[i] = ni() a[i] a i ni() ni return a; a int n n //Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	} ns {
		return next().toCharArray();
	} return next().toCharArray(); next().toCharArray() next().toCharArray next() next //Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	} nal {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	} long[] a = new long[n]; a new long[n] n for (int i = 0; i < n; i++)
			a[i] = nl(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i a[i] = nl(); a[i] = nl() a[i] a i nl() nl return a; a int n n public class Main {
	private static void solve(){
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	}

    //Switch input source (stdin/file)
	private static BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args){
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	}

    //Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
    //Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
    //Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
    //Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
    //Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
    //Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
} public class Main {
	private static void solve(){
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	}

    //Switch input source (stdin/file)
	private static BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args){
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	}

    //Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
    //Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
    //Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
    //Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
    //Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
    //Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	private static void solve(){
	//Implement solution here.
		int n = ni();
		int m = ni();		
		boolean[] broken = new boolean[n + 1];
		for(int i = 0; i < m; i++) {
			broken[ni()] = true;
		}
		int[] dp = new int[n + 1];
		dp[0] = 1;
		int mod = 1000000007;
		
		if(n <= 1) {
			System.out.println(1);
		}else {
			dp[1] = broken[1] ? 0 : 1;
			for(int i = 2; i < n; i++) {
				dp[i] = broken[i] ? 0 : ((dp[i - 2]%mod) + (dp[i - 1]%mod))%mod;
			}
			System.out.println(((dp[n - 2]%mod) + (dp[n - 1]%mod))%mod);
		}		
	}

    //Switch input source (stdin/file)
	private static BufferedReader br  = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args){
        String debugDataPath = System.getenv("DD_PATH");        
        if(debugDataPath != null){
            try{
            	br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
            }catch(Exception e){
                throw new RuntimeException(e);
            }
        }
        solve();
	}

    //Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
    //Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
    //Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
    //Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
    //Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
    //Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}