#include <bits/stdc++.h>

#define N 100000
#define M 17112025
using namespace std;
int f[N+5], a[N+5];
bool d[N+5];

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    freopen("BAI4.inp", "r", stdin);
    freopen("BAI4.out", "w", stdout);
    int n,k;
    cin>>n>>k;
    for(int i=1;i<=n;i++)
        d[i]=true;
    for(int i=1;i<=k;i++)
    {
        cin>>a[i];
        d[a[i]]=false;
    }
    f[1]=1;f[0]=0;
    for(int i=2;i<=n;i++)
        {if(d[i]==true) f[i]=(f[i-1]%M+f[i-2]%M)%M;
        if(d[i]==false) {f[i]=0;continue;}
        }
    cout<<f[n];
    return 0;
}
