#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a, int b){return a*b/gcd(a,b);}

using namespace std;

const int mod=1e9+7;

void run();
signed tansaku(int now);

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

int ans=0;
vi a(1);
int n,m;
void run(){
    cin >> n >> m;
    a.resize(m,0);
    rep(i,m)
    {
        int d;
        cin >> d;
        a[d-1]=1;
    }
    tansaku(0);
    ans%=mod;
    cout << ans <<endl;
}

signed tansaku(int now){
    if(a[now]==1)return 0;
    if(now>=n-1)
    {
        ans++;
        return 0;
    }
    tansaku(now+1);
    tansaku(now+2);
}


#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a, int b){return a*b/gcd(a,b);}

using namespace std;

const int mod=1e9+7;

void run();
signed tansaku(int now);

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

int ans=0;
vi a(1);
int n,m;
void run(){
    cin >> n >> m;
    a.resize(m,0);
    rep(i,m)
    {
        int d;
        cin >> d;
        a[d-1]=1;
    }
    tansaku(0);
    ans%=mod;
    cout << ans <<endl;
}

signed tansaku(int now){
    if(a[now]==1)return 0;
    if(now>=n-1)
    {
        ans++;
        return 0;
    }
    tansaku(now+1);
    tansaku(now+2);
}


