#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e9+7;
ll vis[100005],re[100005];
ll f(ll x)
{
    if(vis[x])
        return 0;
    if(x==1)
        return 1;
    if(vis[1]&&!vis[2]&&x==2)
        return 1;
    if(x==2)
        return 2;
    if(re[x])
        return re[x]%mod;

    return re[x]=(f(x-1)%mod+f(x-2)%mod)%mod;
}
int main()
{
    ll n,k;
    scanf("%lld%lld",&n,&k);
    for(ll i=1; i<=k; i++)
    {
        ll x;
        scanf("%lld",&x);
        vis[x]=1;
    }
    printf("%lld\n",f(n));
    return 0;
}

