#include <bits/stdc++.h>
#define rep(i,a,b) for (long long i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
using namespace std;

int n,m;
vector <int>a(1000010,0);
vector<int>done(1000010,0);
vector<int>flag(1000010,0);
void dfs(int k)
{
    flag.at(k)=1;
    if(a.at(k)==1)return;
    if(k==n){a.at(n)=1;return;}
    if(k>n)return;
    if(flag.at(k+1)==0)dfs(k+1);
    if(flag.at(k+2)==0)dfs(k+2);
    if(done.at(k)>=1000000007)done.at(k)%=1000000007;
    done.at(k)=done.at(k+1)+done.at(k+2)
}

int main()
{
    cin>>n>>m;
    REP(i,m)
    {
        int x;
        cin>>x;
        a.at(x)=1;
    }
    dfs(0);
    cout<<done.at(0)<<endl;
}
