import java.util.Scanner;

public class Main {

    static final int MOD = 1_000_000_007;

    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];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[n]);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    static final int MOD = 1_000_000_007;

    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];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[n]);
    }

} Main static final int MOD = 1_000_000_007; MOD 1_000_000_007 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];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[n]);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[] a = new int[m];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[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 for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            a[i] = sc.nextInt();
        } {
            a[i] = sc.nextInt();
        } a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int ans[] = new int[n + 1]; ans new int[n + 1] n + 1 n 1 ans[0] = 1 ans[0] ans 0 1 ans[1] = 1 ans[1] ans 1 1 int index = 0; index 0 for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        } int i = 2; int i = 2; i 2 i < n + 1 i n + 1 n 1 i++ i++ i {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        } {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        } if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            } index < m index m {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            } if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                } i - 1 == a[index] i - 1 i 1 a[index] a index {
                    ans[i - 1] = 0;
                    index++;
                } ans[i - 1] = 0 ans[i - 1] ans i - 1 i 1 0 index++ index ans[i] = (ans[i - 2] + ans[i - 1]) % MOD ans[i] ans i (ans[i - 2] + ans[i - 1]) % MOD (ans[i - 2] + ans[i - 1]) ans[i - 2] ans i - 2 i 2 ans[i - 1] ans i - 1 i 1 MOD System.out.println(ans[n]) System.out.println System.out System System.out ans[n] ans n String[] args args public class Main {

    static final int MOD = 1_000_000_007;

    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];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[n]);
    }

} public class Main {

    static final int MOD = 1_000_000_007;

    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];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[n]);
    }

} Main
import java.util.Scanner;

public class Main {

    static final int MOD = 1_000_000_007;

    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];
        for (int i = 0; i < m; i++) {
            a[i] = sc.nextInt();
        }
        sc.close();

        int ans[] = new int[n + 1];
        ans[0] = 1;
        ans[1] = 1;
        int index = 0;
        for (int i = 2; i < n + 1; i++) {
            // 壊れている床を考慮
            if (index < m) {
                if (i - 1 == a[index]) {
                    ans[i - 1] = 0;
                    index++;
                }
            }
            // dpで算出
            ans[i] = (ans[i - 2] + ans[i - 1]) % MOD;
        }
        System.out.println(ans[n]);
    }

}
