import java.util.*;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    }

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

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    }

} Main public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    } main {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int mod = (int)1e9 + 7; mod (int)1e9 + 7 (int)1e9 7 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int block[] = new int[m]; block new int[m] m for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            block[i] = sc.nextInt();
        } {
            block[i] = sc.nextInt();
        } block[i] = sc.nextInt() block[i] block i sc.nextInt() sc.nextInt sc int sums[] = new int[n+1]; sums new int[n+1] n+1 n 1 boolean stone[] = new boolean[n+1]; stone new boolean[n+1] n+1 n 1 for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            stone[block[i]] = true;
        } {
            stone[block[i]] = true;
        } stone[block[i]] = true stone[block[i]] stone block[i] block i true if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        } m==0 m 0 {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        } sums[0] = 1 sums[0] sums 0 1 sums[1] = 1 sums[1] sums 1 1 for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                } stone[i + 2] == false stone[i + 2] stone i + 2 i 2 false {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } sums[i + 2] = (sums[i + 1] + sums[i]) % mod sums[i + 2] sums i + 2 i 2 (sums[i + 1] + sums[i]) % mod (sums[i + 1] + sums[i]) sums[i + 1] sums i + 1 i 1 sums[i] sums i mod if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                } stone[i + 2] == true stone[i + 2] stone i + 2 i 2 true {
                    sums[i + 2] = 0;
                } sums[i + 2] = 0 sums[i + 2] sums i + 2 i 2 0 System.out.println(sums[n] % mod) System.out.println System.out System System.out sums[n] % mod sums[n] sums n mod return; if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        } block[0]==0 block[0] block 0 0 {System.out.println(0);} System.out.println(0) System.out.println System.out System System.out 0 if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        } block[0]==1 block[0] block 0 1 {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        } sums[0] = 1 sums[0] sums 0 1 sums[1] = 0 sums[1] sums 1 0 for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                } stone[i + 2] == false stone[i + 2] stone i + 2 i 2 false {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } sums[i + 2] = (sums[i + 1] + sums[i]) % mod sums[i + 2] sums i + 2 i 2 (sums[i + 1] + sums[i]) % mod (sums[i + 1] + sums[i]) sums[i + 1] sums i + 1 i 1 sums[i] sums i mod if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                } stone[i + 2] == true stone[i + 2] stone i + 2 i 2 true {
                    sums[i + 2] = 0;
                } sums[i + 2] = 0 sums[i + 2] sums i + 2 i 2 0 System.out.println(sums[n] % mod) System.out.println System.out System System.out sums[n] % mod sums[n] sums n mod {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        } sums[0] = 1 sums[0] sums 0 1 sums[1] = 1 sums[1] sums 1 1 for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } int i = 0; int i = 0; i 0 i < n - 1 i n - 1 n 1 i++ i++ i {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            } if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                } stone[i + 2] == false stone[i + 2] stone i + 2 i 2 false {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } sums[i + 2] = (sums[i + 1] + sums[i]) % mod sums[i + 2] sums i + 2 i 2 (sums[i + 1] + sums[i]) % mod (sums[i + 1] + sums[i]) sums[i + 1] sums i + 1 i 1 sums[i] sums i mod if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                } stone[i + 2] == true stone[i + 2] stone i + 2 i 2 true {
                    sums[i + 2] = 0;
                } sums[i + 2] = 0 sums[i + 2] sums i + 2 i 2 0 System.out.println(sums[n] % mod) System.out.println System.out System System.out sums[n] % mod sums[n] sums n mod String args[] args public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    }

} public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    }

} Main
import java.util.*;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);

        int mod = (int)1e9 + 7;

        int n = sc.nextInt();
        int m = sc.nextInt();

        int block[] = new int[m];

        for (int i=0; i<m; i++){
            block[i] = sc.nextInt();
        }


        int sums[] = new int[n+1];

        boolean stone[] = new boolean[n+1];

        for (int i=0; i<m; i++) {
            stone[block[i]] = true;
        }


        if (m==0) {
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
            return;

        }
        if (block[0]==0) {System.out.println(0);}
        else if (block[0]==1) {
            sums[0] = 1;
            sums[1] = 0;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);

        }
        else{
            sums[0] = 1;
            sums[1] = 1;

            for (int i = 0; i < n - 1; i++) {
                if (stone[i + 2] == false) {
                    sums[i + 2] = (sums[i + 1] + sums[i]) % mod;
                } else if (stone[i + 2] == true) {
                    sums[i + 2] = 0;
                }
            }

            System.out.println(sums[n] % mod);
        }


    }

}
