import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.AbstractMap.SimpleEntry;

public class Main {

    static final int modnum = 1000000000 + 7;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.Comparator; Comparator java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util import java.util.AbstractMap.SimpleEntry; SimpleEntry java.util.AbstractMap public class Main {

    static final int modnum = 1000000000 + 7;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    }
} Main static final int modnum = 1000000000 + 7; modnum 1000000000 + 7 1000000000 7 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    } 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 boolean[] stair = new boolean[N+5]; stair new boolean[N+5] N+5 N 5 int[] dp = new int[N+5]; dp new int[N+5] N+5 N 5 for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        } int i = 0; int i = 0; i 0 i < M i M i++ i++ i {
            int broken = sc.nextInt();
            stair[broken] = true;
        } {
            int broken = sc.nextInt();
            stair[broken] = true;
        } int broken = sc.nextInt(); broken sc.nextInt() sc.nextInt sc stair[broken] = true stair[broken] stair broken true dp[1] = stair[1] ? 0 : 1 dp[1] dp 1 stair[1] ? 0 : 1 stair[1] stair 1 0 1 dp[2] = stair[2] ? 0 : dp[1]+1 dp[2] dp 2 stair[2] ? 0 : dp[1]+1 stair[2] stair 2 0 dp[1]+1 dp[1] dp 1 1 for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        } int i = 3; int i = 3; i 3 i <= N i N i++ i++ i {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        } {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        } dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum dp[i] dp i stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum stair[i] stair i 0 (dp[i-1]+dp[i-2])%modnum (dp[i-1]+dp[i-2]) dp[i-1] dp i-1 i 1 dp[i-2] dp i-2 i 2 modnum System.out.println(dp[N]) System.out.println System.out System System.out dp[N] dp N String[] args args public class Main {

    static final int modnum = 1000000000 + 7;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    }
} public class Main {

    static final int modnum = 1000000000 + 7;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    }
} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.AbstractMap.SimpleEntry;

public class Main {

    static final int modnum = 1000000000 + 7;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        boolean[] stair = new boolean[N+5];
        int[] dp = new int[N+5];

        for (int i = 0; i < M; i++) {
            int broken = sc.nextInt();
            stair[broken] = true;
        }
        dp[1] = stair[1] ? 0 : 1;
        dp[2] = stair[2] ? 0 : dp[1]+1;
        for (int i = 3; i <= N; i++) {
            dp[i] = stair[i] ? 0: (dp[i-1]+dp[i-2])%modnum;
        }
        System.out.println(dp[N]);
        // for (int i = 0; i < N; i++) {
        //     System.out.println(stair[i]);
        // }
    }
}