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();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      }
} 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();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      } 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 Integer[] Ms = new Integer[M]; Ms new Integer[M] M int[] checks = new int[N+1]; checks new int[N+1] N+1 N 1 List<Integer> MsList = Arrays.asList(Ms); MsList Arrays.asList(Ms) Arrays.asList Arrays Ms for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        } int m = 0; int m = 0; m 0 m < M m M m++ m++ m {
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        } {
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        } Ms[m] = sc.nextInt() Ms[m] Ms m sc.nextInt() sc.nextInt sc checks[Ms[m]] = 1 checks[Ms[m]] checks Ms[m] Ms m 1 long[] memo = new long[N+1]; memo new long[N+1] N+1 N 1 for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        } int n = 1; int n = 1; n 1 n <= N n N n++ n++ n {
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        } {
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        } if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            } n == 1 n 1 {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            } if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;} checks[1] == 1 checks[1] checks 1 1 {memo[1] = 0;} memo[1] = 0 memo[1] memo 1 0 {memo[1] = 1;} memo[1] = 1 memo[1] memo 1 1 continue; if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            } n == 2 n 2 {
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            } if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;} checks[2] == 1 checks[2] checks 2 1 {memo[2] = 0;} memo[2] = 0 memo[2] memo 2 0 if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;} checks[1] == 1 checks[1] checks 1 1 {memo[2] = 1;} memo[2] = 1 memo[2] memo 2 1 {memo[2] = 2;} memo[2] = 2 memo[2] memo 2 2 continue; boolean inN = (checks[n] == 1); inN (checks[n] == 1) checks[n] checks n 1 if ((inN) && (checks[n-1] == 1)) {
                break;
            } (inN) && (checks[n-1] == 1) (inN) (checks[n-1] == 1) checks[n-1] checks n-1 n 1 1 {
                break;
            } break; if (inN) {
                continue;
            } inN {
                continue;
            } continue; memo[n] = (memo[n-2] + memo[n-1])%1000000007 memo[n] memo n (memo[n-2] + memo[n-1])%1000000007 (memo[n-2] + memo[n-1]) memo[n-2] memo n-2 n 2 memo[n-1] memo n-1 n 1 1000000007 System.out.println(memo[N]%1000000007) System.out.println System.out System System.out memo[N]%1000000007 memo[N] memo N 1000000007 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();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      }
} 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();
        Integer[] Ms = new Integer[M];
        int[] checks = new int[N+1];
        List<Integer> MsList = Arrays.asList(Ms);

        for (int m = 0; m < M; m++){
            Ms[m] = sc.nextInt();
            checks[Ms[m]] = 1;
        }
        long[] memo = new long[N+1];
        for (int n = 1; n <= N; n++){
            if (n == 1) {
                if (checks[1] == 1){memo[1] = 0;}
                else {memo[1] = 1;}
                continue;
            }
            if (n == 2){
                if (checks[2] == 1){memo[2] = 0;}
                else if (checks[1] == 1){memo[2] = 1;}
                else {memo[2] = 2;}
                continue;
            }
            boolean inN = (checks[n] == 1);
            if ((inN) && (checks[n-1] == 1)) {
                break;
            }
            if (inN) {
                continue;
            }
            memo[n] = (memo[n-2] + memo[n-1])%1000000007;
        }
        System.out.println(memo[N]%1000000007);
      }
}
