import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        
        System.out.println(dp[n]);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        
        System.out.println(dp[n]);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        
        System.out.println(dp[n]);
    } main {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % 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 m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int[] a = new int[m]; a new int[m] m boolean[] arr = new boolean[n+1]; arr new boolean[n+1] n+1 n 1 for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } {
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc arr[a[i]] = true arr[a[i]] arr a[i] a i true int[] dp = new int[n+10]; dp new int[n+10] n+10 n 10 int mod = 1_000_000_007; mod 1_000_000_007 dp[0] = 1 dp[0] dp 0 1 dp[1] = arr[1] ? 0 : 1 dp[1] dp 1 arr[1] ? 0 : 1 arr[1] arr 1 0 1 for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod; int i = 2; int i = 2; i 2 i <= n i n i++ i++ i if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod; if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod; !arr[i] arr[i] arr i dp[i] = (dp[i - 1] + dp[i - 2]) % mod dp[i] dp i (dp[i - 1] + dp[i - 2]) % mod (dp[i - 1] + dp[i - 2]) dp[i - 1] dp i - 1 i 1 dp[i - 2] dp i - 2 i 2 mod System.out.println(dp[n]) System.out.println System.out System System.out dp[n] dp n String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        
        System.out.println(dp[n]);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        
        System.out.println(dp[n]);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int m = sc.nextInt();
        
        int[] a = new int[m];
        
        boolean[] arr = new boolean[n+1];
        
        for(int i = 0; i < m; i++){
            a[i] = sc.nextInt();
            arr[a[i]] = true;
        } 
        
        int[] dp = new int[n+10];
        
        int mod = 1_000_000_007;
        
        dp[0] = 1;
        dp[1] = arr[1] ? 0 : 1;
        
        for(int i = 2; i <= n; i++) if(!arr[i]) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        
        System.out.println(dp[n]);
    }
}
