import java.util.Scanner;

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

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

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

        int n = stdIn.nextInt();
        int m = stdIn.nextInt();
        int dp[] = new int[n + 2];
        dp[n + 1] = 0;
        dp[n] = 1;
        for (int i = 0; i < m; i++)
            dp[stdIn.nextInt()] = -1;
        for (int i = n - 1; i >= 0; i--) {
            if (dp[i] == -1)
                dp[i] = 0;
            else
                dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
        }
        System.out.println(dp[0]);
    } main {
        Scanner stdIn = new Scanner(System.in);

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

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

        int n = stdIn.nextInt();
        int m = stdIn.nextInt();
        int dp[] = new int[n + 2];
        dp[n + 1] = 0;
        dp[n] = 1;
        for (int i = 0; i < m; i++)
            dp[stdIn.nextInt()] = -1;
        for (int i = n - 1; i >= 0; i--) {
            if (dp[i] == -1)
                dp[i] = 0;
            else
                dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
        }
        System.out.println(dp[0]);
    }
} Main
import java.util.Scanner;

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

        int n = stdIn.nextInt();
        int m = stdIn.nextInt();
        int dp[] = new int[n + 2];
        dp[n + 1] = 0;
        dp[n] = 1;
        for (int i = 0; i < m; i++)
            dp[stdIn.nextInt()] = -1;
        for (int i = n - 1; i >= 0; i--) {
            if (dp[i] == -1)
                dp[i] = 0;
            else
                dp[i] = (dp[i + 1] + dp[i + 2]) % 1000000007;
        }
        System.out.println(dp[0]);
    }
}
