import java.util.*;

public class Main {
    static long MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    }
} import java.util.*; util.* java public class Main {
    static long MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    }
} Main static long MOD = 1000000007; MOD 1000000007 public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc boolean[] ng = new boolean[n+1]; ng new boolean[n+1] n+1 n 1 for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        } int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
            int num = sc.nextInt();
            ng[num] = true;
        } {
            int num = sc.nextInt();
            ng[num] = true;
        } int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc ng[num] = true ng[num] ng num true long[] dp = new long[n+1]; dp new long[n+1] n+1 n 1 dp[0] = 1 dp[0] dp 0 1 dp[1] = 1 dp[1] dp 1 1 for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        } int i = 2; int i = 2; i 2 i <= n i n i++ i++ i {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        } {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        } if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            } !ng[i-1] ng[i-1] ng i-1 i 1 {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            } dp[i] += dp[i-1] dp[i] dp i dp[i-1] dp i-1 i 1 dp[i] %= MOD dp[i] dp i MOD if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            } !ng[i-2] ng[i-2] ng i-2 i 2 {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            } dp[i] += dp[i-2] dp[i] dp i dp[i-2] dp i-2 i 2 dp[i] %= MOD dp[i] dp i MOD System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String[] args args public class Main {
    static long MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    }
} public class Main {
    static long MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    }
} Main
import java.util.*;

public class Main {
    static long MOD = 1000000007;
    
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        boolean[] ng = new boolean[n+1];
        for (int i = 0; i < k; i++) {
            int num = sc.nextInt();
            ng[num] = true;
        }
        
        long[] dp = new long[n+1];
        dp[0] = 1;
        dp[1] = 1;
        for (int i = 2; i <= n; i++) {
            if (!ng[i-1]) {
                dp[i] += dp[i-1];
                dp[i] %= MOD;
            }
            if (!ng[i-2]) {
                dp[i] += dp[i-2];
                dp[i] %= MOD;
            }
        }
        System.out.println(dp[n]);
    }
}