import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    static final long MOD = 1000000007;
    static int n;
    static int m;
    static int[] b;
    static long[] dp;

    private static long rec(int current) {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    }

    public static void main(String[] args) {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    }
} import java.math.BigDecimal; BigDecimal java.math import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    static final long MOD = 1000000007;
    static int n;
    static int m;
    static int[] b;
    static long[] dp;

    private static long rec(int current) {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    }

    public static void main(String[] args) {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    }
} Main static final long MOD = 1000000007; MOD 1000000007 static int n; n static int m; m static int[] b; b static long[] dp; dp private static long rec(int current) {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    } rec {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    } if (current == n) return 1; current == n current n return 1; 1 if (current > n) return 0; current > n current n return 0; 0 if (b[current] == 1) return 0; b[current] == 1 b[current] b current 1 return 0; 0 if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        } dp[current] == MOD dp[current] dp current MOD {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        } dp[current] = (rec(current + 1) + rec(current + 2)) % MOD dp[current] dp current (rec(current + 1) + rec(current + 2)) % MOD (rec(current + 1) + rec(current + 2)) rec(current + 1) rec current + 1 current 1 rec(current + 2) rec current + 2 current 2 MOD return dp[current]; dp[current] dp current int current current public static void main(String[] args) {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    } main {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    } java.util.Scanner input = new Scanner(System.in); input new Scanner(System.in) n = input.nextInt() n input.nextInt() input.nextInt input m = input.nextInt() m input.nextInt() input.nextInt input b = new int[n] b new int[n] n dp = new long[n] dp new long[n] n for (int i = 0; i < n; i++) dp[i] = MOD; int i = 0; int i = 0; i 0 i < n i n i++ i++ i dp[i] = MOD; dp[i] = MOD dp[i] dp i MOD for (int i = 0; i < m; i++) b[input.nextInt()] = 1; int i = 0; int i = 0; i 0 i < m i m i++ i++ i b[input.nextInt()] = 1; b[input.nextInt()] = 1 b[input.nextInt()] b input.nextInt() input.nextInt input 1 long r = rec(0); r rec(0) rec 0 System.out.println(r) System.out.println System.out System System.out r String[] args args public class Main {

    static final long MOD = 1000000007;
    static int n;
    static int m;
    static int[] b;
    static long[] dp;

    private static long rec(int current) {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    }

    public static void main(String[] args) {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    }
} public class Main {

    static final long MOD = 1000000007;
    static int n;
    static int m;
    static int[] b;
    static long[] dp;

    private static long rec(int current) {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    }

    public static void main(String[] args) {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    }
} Main
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    static final long MOD = 1000000007;
    static int n;
    static int m;
    static int[] b;
    static long[] dp;

    private static long rec(int current) {
        if (current == n) return 1;
        if (current > n) return 0;
        if (b[current] == 1) return 0;
        if (dp[current] == MOD) {
            dp[current] = (rec(current + 1) + rec(current + 2)) % MOD;
        }
        return dp[current];
    }

    public static void main(String[] args) {
        java.util.Scanner input = new Scanner(System.in);
        n = input.nextInt();
        m = input.nextInt();
        b = new int[n];
        dp = new long[n];
        for (int i = 0; i < n; i++) dp[i] = MOD;
        for (int i = 0; i < m; i++) b[input.nextInt()] = 1;
        long r = rec(0);
        System.out.println(r);
    }
}
