#include<bits/stdc++.h>
using namespace std;
int n;
const long long mod=1e9+7;
long long a[100005]={1,1,2,3,5};
bool vis[100005];
int main()
{
    int n,m;
    scanf("%d%d",&n,&m);
    while(m--)
    {
        int ab;
        scanf("%d",&ab);
        a[ab]=0;
        vis[ab]=1;
    }
    for(int i=2;i<=n;i++)
    {
        if(vis[i]==1)continue;
        a[i]=a[i-1]+a[i-2];
        a[i]%=mod;
    }
    printf("%lld",a[n]%mod);
    return 0;
}
