import java.util.*;

public class Main {

    public static long solve(int n, int m, Set<Integer> broken) {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    }


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

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    }
} import java.util.*; util.* java public class Main {

    public static long solve(int n, int m, Set<Integer> broken) {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    }


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

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    }
} Main public static long solve(int n, int m, Set<Integer> broken) {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    } solve {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    } long[] cnt = new long[n + 1]; cnt new long[n + 1] n + 1 n 1 cnt[0] = 1 cnt[0] cnt 0 1 if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        } broken.contains(1) broken.contains broken 1 {
            cnt[1] = 0;
        } cnt[1] = 0 cnt[1] cnt 1 0 {
            cnt[1] = 1;
        } cnt[1] = 1 cnt[1] cnt 1 1 for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        } int i = 2; int i = 2; i 2 i <= n i n ++i ++i i {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        } {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        } if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            } broken.contains(i) broken.contains broken i {
                cnt[i] = 0;
            } cnt[i] = 0 cnt[i] cnt i 0 {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            } cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L cnt[i] cnt i (cnt[i - 1] + cnt[i - 2]) % 1000000007L (cnt[i - 1] + cnt[i - 2]) cnt[i - 1] cnt i - 1 i 1 cnt[i - 2] cnt i - 2 i 2 1000000007L return cnt[n]; cnt[n] cnt n int n n int m m Set<Integer> broken broken public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    } 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 Set<Integer> broken = new HashSet<Integer>(); broken new HashSet<Integer>() for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        } int i = 0; int i = 0; i 0 i < m i m ++i ++i i {
            broken.add(sc.nextInt());
        } {
            broken.add(sc.nextInt());
        } broken.add(sc.nextInt()) broken.add broken sc.nextInt() sc.nextInt sc System.out.println(solve(n, m, broken)) System.out.println System.out System System.out solve(n, m, broken) solve n m broken String[] args args public class Main {

    public static long solve(int n, int m, Set<Integer> broken) {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    }


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

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    }
} public class Main {

    public static long solve(int n, int m, Set<Integer> broken) {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    }


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

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    }
} Main
import java.util.*;

public class Main {

    public static long solve(int n, int m, Set<Integer> broken) {
        long[] cnt = new long[n + 1];

        cnt[0] = 1;
        if (broken.contains(1)) {
            cnt[1] = 0;
        } else {
            cnt[1] = 1;
        }
        for (int i = 2; i <= n; ++i) {
//            System.out.println(String.format("%d, %d", i, cnt[i-1]));
            if (broken.contains(i)) {
                cnt[i] = 0;
            } else {
                cnt[i] = (cnt[i - 1] + cnt[i - 2]) % 1000000007L;
            }
        }
        return cnt[n];
    }


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

        int n = sc.nextInt();
        int m = sc.nextInt();
        Set<Integer> broken = new HashSet<Integer>();
        for (int i = 0; i < m; ++i) {
            broken.add(sc.nextInt());
        }

        System.out.println(solve(n, m, broken));
    }
}
