import java.util.Scanner;

class MOD {
    static final int mod = 1000000007;

    static int add(int a, int b){
        int x = a + b;
        return (x >= mod) ? x - mod : x;
    }

    static int sub(int a, int b){
        int x = a - b;
        return (x < 0) ? x + mod : x;
    }

    static int mul(int a, int b){
        long x = (long)a * (long)b;
        return (int)(x % mod);
    }

    static int div(int a, int b){
        return mul(a, modinv(b));
    }

    static int modinv(int a) {
        int b = mod;
        int u = 1;
        int v = 0;
        while (b != 0) {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        }
        u %= mod;
        if (u < 0) u += mod;
        return u;
    }
}

public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	}
} import java.util.Scanner; Scanner java.util class MOD {
    static final int mod = 1000000007;

    static int add(int a, int b){
        int x = a + b;
        return (x >= mod) ? x - mod : x;
    }

    static int sub(int a, int b){
        int x = a - b;
        return (x < 0) ? x + mod : x;
    }

    static int mul(int a, int b){
        long x = (long)a * (long)b;
        return (int)(x % mod);
    }

    static int div(int a, int b){
        return mul(a, modinv(b));
    }

    static int modinv(int a) {
        int b = mod;
        int u = 1;
        int v = 0;
        while (b != 0) {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        }
        u %= mod;
        if (u < 0) u += mod;
        return u;
    }
} MOD static final int mod = 1000000007; mod 1000000007 static int add(int a, int b){
        int x = a + b;
        return (x >= mod) ? x - mod : x;
    } add {
        int x = a + b;
        return (x >= mod) ? x - mod : x;
    } int x = a + b; x a + b a b return (x >= mod) ? x - mod : x; (x >= mod) ? x - mod : x (x >= mod) x mod x - mod x mod x int a a int b b static int sub(int a, int b){
        int x = a - b;
        return (x < 0) ? x + mod : x;
    } sub {
        int x = a - b;
        return (x < 0) ? x + mod : x;
    } int x = a - b; x a - b a b return (x < 0) ? x + mod : x; (x < 0) ? x + mod : x (x < 0) x 0 x + mod x mod x int a a int b b static int mul(int a, int b){
        long x = (long)a * (long)b;
        return (int)(x % mod);
    } mul {
        long x = (long)a * (long)b;
        return (int)(x % mod);
    } long x = (long)a * (long)b; x (long)a * (long)b (long)a (long)b return (int)(x % mod); (int)(x % mod) x mod int a a int b b static int div(int a, int b){
        return mul(a, modinv(b));
    } div {
        return mul(a, modinv(b));
    } return mul(a, modinv(b)); mul(a, modinv(b)) mul a modinv(b) modinv b int a a int b b static int modinv(int a) {
        int b = mod;
        int u = 1;
        int v = 0;
        while (b != 0) {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        }
        u %= mod;
        if (u < 0) u += mod;
        return u;
    } modinv {
        int b = mod;
        int u = 1;
        int v = 0;
        while (b != 0) {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        }
        u %= mod;
        if (u < 0) u += mod;
        return u;
    } int b = mod; b mod int u = 1; u 1 int v = 0; v 0 while (b != 0) {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        } b != 0 b 0 {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        } int t = a / b; t a / b a b a -= t * b a t * b t b int temp = a; temp a a = b a b b = temp b temp u -= t * v u t * v t v temp = u temp u u = v u v v = temp v temp u %= mod u mod if (u < 0) u += mod; u < 0 u 0 u += mod u mod return u; u int a a public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	}
} Main static Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) public static void main(String[] args){
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	} main {
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	} int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int m = stdIn.nextInt(); m stdIn.nextInt() stdIn.nextInt stdIn boolean[] crash = new boolean[n]; crash new boolean[n] n for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		} int i=0; int i=0; i 0 i<m i m i++ i++ i {
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		} {
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		} int idx = stdIn.nextInt(); idx stdIn.nextInt() stdIn.nextInt stdIn crash[idx-1] = true crash[idx-1] crash idx-1 idx 1 true int[] dp = new int[n]; dp new int[n] n dp[0] = crash[0] ? 0 : 1 dp[0] dp 0 crash[0] ? 0 : 1 crash[0] crash 0 0 1 if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1; 2 <= n 2 n dp[1] = crash[1] ? 0 : dp[0] + 1 dp[1] dp 1 crash[1] ? 0 : dp[0] + 1 crash[1] crash 1 0 dp[0] + 1 dp[0] dp 0 1 for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		} int i=2; int i=2; i 2 i<n i n i++ i++ i {
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		} {
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		} if(!crash[i-1]){
				dp[i] = dp[i-1];
			} !crash[i-1] crash[i-1] crash i-1 i 1 {
				dp[i] = dp[i-1];
			} dp[i] = dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			} !crash[i-2] crash[i-2] crash i-2 i 2 {
				dp[i] = MOD.add(dp[i], dp[i-2]);
			} dp[i] = MOD.add(dp[i], dp[i-2]) dp[i] dp i MOD.add(dp[i], dp[i-2]) MOD.add MOD dp[i] dp i dp[i-2] dp i-2 i 2 System.out.println(dp[n-1]) System.out.println System.out System System.out dp[n-1] dp n-1 n 1 String[] args args public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	}
} public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	}
} Main
import java.util.Scanner;

class MOD {
    static final int mod = 1000000007;

    static int add(int a, int b){
        int x = a + b;
        return (x >= mod) ? x - mod : x;
    }

    static int sub(int a, int b){
        int x = a - b;
        return (x < 0) ? x + mod : x;
    }

    static int mul(int a, int b){
        long x = (long)a * (long)b;
        return (int)(x % mod);
    }

    static int div(int a, int b){
        return mul(a, modinv(b));
    }

    static int modinv(int a) {
        int b = mod;
        int u = 1;
        int v = 0;
        while (b != 0) {
            int t = a / b;
            a -= t * b;
            int temp = a; a = b; b = temp; // swap(a, b)
            u -= t * v;
            temp = u; u = v; v = temp; // swap(u, v)
        }
        u %= mod;
        if (u < 0) u += mod;
        return u;
    }
}

public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
		int n = stdIn.nextInt();
		int m = stdIn.nextInt();
		boolean[] crash = new boolean[n];
		for(int i=0; i<m; i++){
			int idx = stdIn.nextInt();
			crash[idx-1] = true;
		}

		int[] dp = new int[n];
		dp[0] = crash[0] ? 0 : 1;
		if(2 <= n)
			dp[1] = crash[1] ? 0 : dp[0] + 1;
		for(int i=2; i<n; i++){
			if(!crash[i-1]){
				dp[i] = dp[i-1];
			}
			if(!crash[i-2]){
				dp[i] = MOD.add(dp[i], dp[i-2]);
			}
		}

		System.out.println(dp[n-1]);
	}
}
