#include <bits/stdc++.h>
using namespace std;
#define INF 100000000000000
int main() {
    int N, M;
    cin >> N >> M;
    int a[N];
    bool broken[N];
    for(int i = 0; i < N; i++) {
        broken[i] = true;
    }
    long long int dp[N+1] = {};
    dp[0] = 1;
    dp[1] = 2;
    for(int i = 0; i < M; i++) {
        cin >> a[i];
        broken[a[i]-1] = false;
        dp[a[i]-1] = INF;
    }
    if(dp[0] == INF) {
        dp[1] = 1;
    }

    for(int i = 2; i < N; i++) {
        if(broken[i]) {
            if(dp[i-1] == INF && dp[i-2] == INF) {
                cout << 0 << endl;
                return 0;
            }
            dp[i] += dp[i-1]%INF + dp[i-2]%INF;
            dp[i] %= 1000000007;
        }
    }
    for(int i = 0 ; i < N; i++) {
        cout << dp[i] << endl;
    }
    if(dp[N-1] == INF) {
        dp[N-1] = 0;
    }
    cout << dp[N-1] << endl;
}