#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define inf (ll)1e9
#define mod (ll)(1e9+7)
#define d(x) cerr<<#x<<"="<<x<<endl;
#define p(x) cout<<(x)<<endl
#define ps(x) cout<<(x);
#define pfix(d,x) cout << fixed << setprecision(d) << x << endl;
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define minel(v) *min_element(all(v))
#define minind(v) distance((v).begin(), min_element(all(v)))
#define maxel(v) *max_element(all(v))
#define maxind(v) distance((v).begin(), max_element(all(v)))
#define fi first
#define se second
ll a[100005],b,c,d,n,m,p,q,x,y,k,h,w,sum,mi,ma,ans,l,r,res;
string s;
typedef vector<int> VI;
typedef vector<pair<int,int> > VP;

ll dp[100005];

void solve(){
    rep(i,n+1){
        dp[i]%=mod;
        if(!a[i+1]){dp[i+1]+=dp[i];dp[i+1]%=mod;}
        if(!a[i+2]){dp[i+2]+=dp[i];dp[i+2]%=mod;}
}

int main(){
    cin>>n>>m;
    rep(i,m){cin>>b;a[b]=1;}
    dp[0]=1;
    solve();
    rep(i,n+1)d(dp[i]);
    p(dp[n]%mod);
    return 0;
}
