#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <boost/range/algorithm.hpp>
#include <boost/integer/common_factor_rt.hpp>

using namespace std;

int N, M, ret;
bool b[10^5];
int dp[10^5];

int step(int s) {
    if (s > N - 1 || b[s]) {
        return 0;
    }
    if (s == N - 1) {
        return 1;
    }
    int ret = dp[s + 1] % 1000000007;
    if (s + 2 != N) {
        ret += dp[s + 2] % 1000000007;
    }
    return ret;
}

int main() {

    while (cin >> N >> M) {
        for (int i = 0; i < N; i++) {
            b[i] = false;
        }
        for (int i = 0; i < M; i++) {
            int a;
            cin >> a;
            b[a - 1] = true;
        }
        for (int i = 0; i < N; i++) {
            dp[N - i - 1] = step(N - i - 1);
        }

        int ret = dp[0] % 1000000007;
        if (1 != N) {
            ret += dp[1] % 1000000007;
        }
        cout << ret << endl;
    }

    return 0;
}
