#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
#define all(x) (x).begin(), (x).end() 

typedef long long ll;
typedef pair <int, int> ii;
typedef pair <ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef long double ld;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
typedef set<int>::iterator sit;
typedef map<int,int>::iterator mit;
typedef vector<int>::iterator vit;

long long INF=numeric_limits<long long>::max();

int vis[100111],a[100111];

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    //freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    int n,m,x; cin >> n >> m;
    memset(a,0,sizeof(a));
    for(int i = 0 ; i < m; i++){
		cin >> x;
		vis[x] = 1;
	}
	if(n==1){
		cout << 1 << endl;
		return 0;
	}else if(n==2){
		if(m==0)cout << 3 << endl;
		else cout << 1 << endl;
		return 0;
	}
	if(!vis[1])a[1]=1;
	if(!vis[2])a[2]=1+a[1];
	for(int i = 3; i <= n; i++){
		if(!vis[i])a[i] = a[i-1]+a[i-2];
		a[i]%=1000000007;
	}
	cout << a[n]%1000000007 << endl;
}	
