import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    }

    static long find(int current, int n, boolean[] a, long[] g){
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    }

    static long find(int current, int n, boolean[] a, long[] g){
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int m = scan.nextInt(); m scan.nextInt() scan.nextInt scan boolean[] a = new boolean[n]; a new boolean[n] n long[] g = new long[n]; g new long[n] n for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        } int k=0; int k=0; k 0 k<n k n k++ k++ k {
            a[k] = false;
            g[k] = 0;
        } {
            a[k] = false;
            g[k] = 0;
        } a[k] = false a[k] a k false g[k] = 0 g[k] g k 0 for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        } int i=0; int i=0; i 0 i<m i m i++ i++ i {
            int t = scan.nextInt();
            a[t-1] = true;
        } {
            int t = scan.nextInt();
            a[t-1] = true;
        } int t = scan.nextInt(); t scan.nextInt() scan.nextInt scan a[t-1] = true a[t-1] a t-1 t 1 true if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        } n == 1 n 1 {
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        } if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            } m == 1 m 1 {
                System.out.println(0);
            } System.out.println(0) System.out.println System.out System System.out 0 {
                System.out.println(1);
            } System.out.println(1) System.out.println System.out System System.out 1 return; long sum = 0; sum 0 g[0] = 1 g[0] g 0 1 g[1] = 1 g[1] g 1 1 if (a[0] == true){
            g[1] = 0;
        } a[0] == true a[0] a 0 true {
            g[1] = 0;
        } g[1] = 0 g[1] g 1 0 sum = find(2, n, a, g) sum find(2, n, a, g) find 2 n a g long q = 1000000007; q 1000000007 System.out.println((long) sum % q) System.out.println System.out System System.out (long) sum % q (long) sum q String[] args args static long find(int current, int n, boolean[] a, long[] g){
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    } find {
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    } if (current == n){
            return g[n-1]+g[n-2];
        } current == n current n {
            return g[n-1]+g[n-2];
        } return g[n-1]+g[n-2]; g[n-1]+g[n-2] g[n-1] g n-1 n 1 g[n-2] g n-2 n 2 if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        } a[current-1] == true a[current-1] a current-1 current 1 true {
            g[current] = 0;
        } g[current] = 0 g[current] g current 0 {
            g[current] = g[current-1] + g[current-2];
        } g[current] = g[current-1] + g[current-2] g[current] g current g[current-1] + g[current-2] g[current-1] g current-1 current 1 g[current-2] g current-2 current 2 long q = 1000000007; q 1000000007 g[current] = (long) g[current] % q g[current] g current (long) g[current] % q (long) g[current] g current q return (long) find(current + 1, n, a, g); (long) find(current + 1, n, a, g) find current + 1 current 1 n a g int current current int n n boolean[] a a long[] g g public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    }

    static long find(int current, int n, boolean[] a, long[] g){
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    }

    static long find(int current, int n, boolean[] a, long[] g){
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int m = scan.nextInt();
        boolean[] a = new boolean[n];
        long[] g = new long[n];

        for (int k=0;k<n;k++){
            a[k] = false;
            g[k] = 0;
        }

        for (int i=0;i<m;i++){
            int t = scan.nextInt();
            a[t-1] = true;
        }

        if (n == 1){
            if (m == 1){
                System.out.println(0);
            }
            else{
                System.out.println(1);
            }
            return;
        }
        long sum = 0;
        g[0] = 1;
        g[1] = 1;
        if (a[0] == true){
            g[1] = 0;
        }
        sum = find(2, n, a, g);
        long q = 1000000007;
        System.out.println((long) sum % q);
    }

    static long find(int current, int n, boolean[] a, long[] g){
        
        if (current == n){
            return g[n-1]+g[n-2];
        }
        
        if (a[current-1] == true){
            g[current] = 0;
        }
        else{
            g[current] = g[current-1] + g[current-2];
        }
        long q = 1000000007;
        g[current] = (long) g[current] % q;
        return (long) find(current + 1, n, a, g);
    }
}