//Jai Bhole Ki
#include <bits/stdc++.h>
using namespace std;
#define fast static int fastline = []() { std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; }();
#define ll long long
#define LL unsigned ll
#define pb push_back
#define pi pair<ll,ll>
#define debug(x) cout<<x<<"\n";
#define debug cout<<"debugged\n";
#define minval -2e9
#define maxval 2e9
long double PI =3.14159265358979323846;
 
const ll M=1e9+7;
const ll inf=1e18;
const ll ms=2e5+5;
fast;
ll ans;
void solve()
{
    ll n,m;cin>>n>>m;vector<ll>dp(n+2,0);vector<bool>ar(n+2,0);
    for(ll i=0;i<m;i++)
    {
        ll a;cin>>a;ar[a]=1;
        if(ar[a-1]||ar[a+1])
        {cout<<0;return;}
    }
    dp[0]=1;dp[1]=1;
    for(ll i=2;i<=n;i++)
    {
        if(!ar[i-1])
            dp[i]+=dp[i-1];
        if(!ar[i-2])
            dp[i]+=dp[i-2];