import java.util.Scanner;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    }

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

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    }

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    } main {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc long[] ans = new long[n+1]; ans new long[n+1] n+1 n 1 ans[0] = 1 ans[0] ans 0 1 for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        } int i = 0; int i = 0; i 0 i < m i m i++ i++ i {
            ans[sc.nextInt()] = -1;
        } {
            ans[sc.nextInt()] = -1;
        } ans[sc.nextInt()] = -1 ans[sc.nextInt()] ans sc.nextInt() sc.nextInt sc -1 1 if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        } ans[1] == -1 ans[1] ans 1 -1 1 {
            ans[1] = 0;
        } ans[1] = 0 ans[1] ans 1 0 {
            ans[1] = 1;
        } ans[1] = 1 ans[1] ans 1 1 for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        } int i = 2; int i = 2; i 2 i < n+1 i n+1 n 1 i++ i++ i {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        } {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        } if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            } ans[i] == -1 ans[i] ans i -1 1 {
                ans[i] = 0;
            } ans[i] = 0 ans[i] ans i 0 {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            } ans[i] = (ans[i-2] + ans[i-1]) % 1000000007 ans[i] ans i (ans[i-2] + ans[i-1]) % 1000000007 (ans[i-2] + ans[i-1]) ans[i-2] ans i-2 i 2 ans[i-1] ans i-1 i 1 1000000007 System.out.println(ans[n]) System.out.println System.out System System.out ans[n] ans n String[] args args public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    }

} public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    }

} Main
import java.util.Scanner;

public class Main {

    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] ans = new long[n+1];
        ans[0] = 1;
        for (int i = 0; i < m; i++) {
            ans[sc.nextInt()] = -1;
        }
        if (ans[1] == -1) {
            ans[1] = 0;
        } else {
            ans[1] = 1;
        }
        for (int i = 2; i < n+1; i++) {
            if(ans[i] == -1) {
                ans[i] = 0;
            } else {
                ans[i] = (ans[i-2] + ans[i-1]) % 1000000007;
            }
        }
        System.out.println(ans[n]);
    }

}
