#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main(){
	int n, k;
	cin >> n >> k;
	vector<int> ks(k);
	vector<int> ns(n+2);
	ns.at(0) = 0;
	ns.at(1) = 1;
	rep(i, k) cin >> ks.at(i);
	for(int i=2; i<n+2; i++){
    	int f = 0;
    	for(int j=0; j<k; j++){
        	if(i-1 == ks.at(j)) f = 1;
        }
    	if(f == 0){
	    	ns.at(i) = ns.at(i-2) + ns.at(i-1);
          	if(ns.at(i) >= 1000000007) ns.at(i) %= 1000000007;
        }else{
        	ns.at(i) = 0;
        }
    }
    cout << ns.at(n+1) << endl;
}