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();

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    }

} 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();

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    } 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 HashSet<Integer> holeList  = new HashSet<>(); holeList new HashSet<>() for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            holeList.add(sc.nextInt());
        } {
            holeList.add(sc.nextInt());
        } holeList.add(sc.nextInt()) holeList.add holeList sc.nextInt() sc.nextInt sc long count = 0; count 0 long countOneBefore = 1; countOneBefore 1 long countTwoBefore = 0; countTwoBefore 0 for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        } int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        } {
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        } if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            } holeList.contains(i + 1) holeList.contains holeList i + 1 i 1 {
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            } count = 0 count 0 countTwoBefore = countOneBefore countTwoBefore countOneBefore countOneBefore = count countOneBefore count {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            } count = countOneBefore + countTwoBefore count countOneBefore + countTwoBefore countOneBefore countTwoBefore if (count >= 1000000007L){
                    count = count % 1000000007L;
                } count >= 1000000007L count 1000000007L {
                    count = count % 1000000007L;
                } count = count % 1000000007L count count % 1000000007L count 1000000007L countTwoBefore = countOneBefore countTwoBefore countOneBefore countOneBefore = count countOneBefore count System.out.println(count) System.out.println System.out System System.out count 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();

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    }

} public class Main {

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

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    }

} 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();

        HashSet<Integer> holeList  = new HashSet<>();

        for (int i = 0; i < m; i++){
            holeList.add(sc.nextInt());
        }

        long count = 0;
        long countOneBefore = 1;
        long countTwoBefore = 0;

        for (int i = 0 ; i < n; i++){
            if (holeList.contains(i + 1)){
                // 穴が開いている場合
                count = 0;
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }else {
                count = countOneBefore + countTwoBefore;
                if (count >= 1000000007L){
                    count = count % 1000000007L;
                }
                countTwoBefore = countOneBefore;
                countOneBefore = count;
            }
        }

        System.out.println(count);
    }

}