import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    } main {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long mod = (long)Math.pow(10,9)+7; mod (long)Math.pow(10,9)+7 (long)Math.pow(10,9) Math.pow Math 10 9 7 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc boolean[] brokes = new boolean[n+1]; brokes new boolean[n+1] n+1 n 1 for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            brokes[sc.nextInt()] = true;
        } {
            brokes[sc.nextInt()] = true;
        } brokes[sc.nextInt()] = true brokes[sc.nextInt()] brokes sc.nextInt() sc.nextInt sc true long[] dp = new long[n+1]; dp new long[n+1] n+1 n 1 dp[0] = 1 dp[0] dp 0 1 for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        } {
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        } if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            } brokes[i] brokes i {
                continue;
            } continue; if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            } i == 1 i 1 {
                dp[i] = dp[i-1]%mod;
            } dp[i] = dp[i-1]%mod dp[i] dp i dp[i-1]%mod dp[i-1] dp i-1 i 1 mod {
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            } dp[i] = dp[i-2]%mod + dp[i-1]%mod dp[i] dp i 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 dp[i] %= mod dp[i] dp i mod System.out.println(dp[n]%mod) System.out.println System.out System System.out dp[n]%mod dp[n] dp n mod String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long mod = (long)Math.pow(10,9)+7;
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[] brokes = new boolean[n+1];
        for(int i = 0; i < m; i++){
            brokes[sc.nextInt()] = true;
        }
        long[] dp = new long[n+1];
        dp[0] = 1;
        for(int i = 1; i <= n; i++){
            if(brokes[i]){
                continue;
            }else if(i == 1){
                dp[i] = dp[i-1]%mod;
            }else{
                dp[i] = dp[i-2]%mod + dp[i-1]%mod;
                dp[i] %= mod;
            }
        }
        System.out.println(dp[n]%mod);
    }
}