stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int main(){

  long long int n,m,x;

  cin>>n>>m;

  vector<bool>a(100009,false);

  long long int b[n+1];

  for(long long int i=0;i<m;i++){

    cin>>x;

    a[x]=true;

  }

    b[1] = 1;

    b[2] = 2;

    if(a[1]==true){

        b[1] = 0;

        b[2] = 1;

    }

    if(a[2] == true){

        b[2] = 0;

    }

   for(long long int i=3;i<=n;i++){

        //cout<<a[i]<<endl;

    if(a[i]==true){

             b[i]=0;

    }

    else{

        b[i]=b[i-1]+b[i-2];

   b[i]=b[i]%1000000007;

        //cout<<i<<" "<<b[i]<<endl;

    }

   }

   cout<<b[n]%1000000007<<endl;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<string.h>

int vis[100005];

int n,m;

int mod=1e9+7;

int check()

{

    int i=0,j;

    for(j=1;j<=n;++j)

    {

            if(vis[j]==-1)

            {

                vis[j]=0;

            }

            else

            {

                vis[j]=(j>=2?vis[j-2]:0)%mod+vis[j-1]%mod;

            }

    }

    return vis[j-1]%=mod;

}

int main()

{

    int flag=0;

    memset(vis,0,sizeof(vis));

    scanf("%d %d",&n,&m);

    vis[0]=1;

    for(int i=1;i<=m;i++)

    {

        int x;

        scanf("%d",&x);

        vis[x]=-1;

        if(vis[x-1]==-1)

        {

            flag=1;

        }

    }

    if(flag==1)

    {

        printf("0\n");

    }

    else

    {

        printf("%d",check());

    }

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;



// 入力

int N, M;

bool a[100010];



// DP テーブル

long long dp[100010];



int main() {

    cin.tie(0);

    ios::sync_with_stdio(false);



    cin >> N >> M;

    for (int i = 0; i < M; ++i){

    	int x; cin >> x;

    	a[x] = true;

    }



    // 初期化 (最小化問題なので INF に初期化)

    memset(dp, 0, sizeof(dp));



    // 初期条件

    dp[0] = 1;

    if(a[1]) dp[1] = 0;

    else dp[1] = 1;



    // ループ

    for (int i = 2; i <= N; ++i) {

        if(a[i]) dp[i] = 0;

        else dp[i] = (dp[i-1] + dp[i-2]) % 1000000007;

    }



    // 答え

    cout << dp[N] << endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include "bits/stdc++.h"

#define rep(i,n) for(int i = 0; i < (n); ++i)

using namespace std;

typedef long long int ll;

typedef pair<int, int> P;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



const int mod = 1000000007;

struct mint{

	ll x;

	mint(ll x = 0):x((x%mod+mod)%mod){}

	mint operator-() const{return mint(-x);}

	mint& operator+=(const mint a){

		if((x += a.x) >= mod) x -= mod;

		return *this;

	}

	mint& operator-=(const mint a){

		if((x += mod-a.x) >= mod) x -= mod;

		return *this;

	}

	mint& operator*=(const mint a){

		(x *= a.x) %= mod;

		return *this;

	}

	mint operator+(const mint a) const{

		mint res(*this);

		return res+=a;

	}

	mint operator-(const mint a) const{

		mint res(*this);

		return res-=a;

	}

	mint operator*(const mint a) const{

		mint res(*this);

		return res*=a;

	}

	mint pow(ll t) const{

		if(!t) return 1;

		mint a = pow(t>>1);

		a *= a;

		if(t&1) a *= *this;

		return a;

	}

	mint inv() const{

		return pow(mod-2);

	}

	mint& operator/=(const mint a){

		return (*this) *= a.inv();

	}

	mint operator/(const mint a) const{

		mint res(*this);

		return res/=a;

	}

	bool operator==(const mint a){

		return x == a.x;

	}

    bool operator!=(const mint a){

		return x != a.x;

	}

};



int main(){

	cin.tie(0);

	ios::sync_with_stdio(false);

    int n, m;

    cin >> n >> m;

    vector<mint> dp(n+5, 0);

    rep(i,m){

        int a;

        cin >> a;

        dp[a] = -1;

    }

    dp[0] = 1;

    rep(i,n+1){

        if(dp[i] == -1) continue;

        if(dp[i+1] != -1) dp[i+1] += dp[i];

        if(dp[i+2] != -1) dp[i+2] += dp[i];

    }

    cout << dp[n].x << endl;

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
// abca29c.cpp : Typical Stairs

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

#define MOD 1000000007

#define rp(i,n) for(int i=0;i<(n);i++)



vector<ll> v(100000+1,-1);



ll calc(int i, int n){

	if(i>n) return 0;

	if(i==n) return 1;

	if(v[i]==-2) return 0;

	if(v[i]==-1){

		v[i] = (calc(i+1,n) + calc(i+2,n)) % MOD;

	}

	return v[i];

}



int main(){

	int n,m; cin>>n>>m;

	rp(i,m){

		int a; cin>>a;

		v[a] = -2;

	}

	ll ans = calc(0,n);

	cout<< ans <<endl;

}

// Optimized solution to the same problem (faster):
// abca29c.cpp : Typical Stairs

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

#define MOD 1000000007

#define rp(i,n) for(int i=0;i<(n);i++)



int main(){

	int n,m; cin>>n>>m;



	vector<bool> ok(n+1,true);

	rp(i,m){

		int a; cin>>a;

		ok[a] = false;

	}



	vector<ll> dp(n+1);

	dp[0] = 1;

	rp(now,n)

		for(int next=now+1; next<=min(n, now+2); next++)

			if(ok[next]) dp[next] = (dp[next] + dp[now]) % MOD;



	cout<< dp[n] <<endl;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
// abca29c.cpp : Typical Stairs

#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007



vector<int> v(100000+1,-1);



int calc(int i, int n){

	if(i>n) return 0;

	if(i==n) return 1;

	if(v[i]==-2) return 0;

	if(v[i]==-1) v[i] = (calc(i+1,n) + calc(i+2,n)) % MOD;

	return v[i];

}



int main(){

	int n,m; cin>>n>>m;



    for(int i=0;i<m;i++){

		int a; cin>>a;

		v[a] = -2;

	}



	int ans = calc(0,n);



	cout<< ans <<endl;

}

// Optimized solution to the same problem (faster):
// abca29c.cpp : Typical Stairs

#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007



int calc(vector<int> &v, int i, int n){

	if(i>n) return 0;

	if(i==n) return 1;

	if(v[i]==-2) return 0;

	if(v[i]==-1) v[i] = (calc(v,i+1,n) + calc(v,i+2,n)) % MOD;

	return v[i];

}



int main(){

	int n,m; cin>>n>>m;



	vector<int> v(n+1,-1);

	for(int i=0;i<m;i++){

		int a; cin>>a;

		v[a] = -2;

	}



	int ans = calc(v,0,n);



	cout<< ans <<endl;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

template <class T>

inline bool chmax(T &a, T b)

{

    if (a < b)

    {

        a = b;

        return 1;

    }

    return 0;

}

template <class T>

inline bool chmin(T &a, T b)

{

    if (a > b)

    {

        a = b;

        return 1;

    }

    return 0;

}

typedef long long int ll;



#define EPS (1e-7)

#define INF (1e9)

#define PI (acos(-1))

#define MOD (1000000007)

#define ALL(v) (v).begin(), (v).end()

int dx[4] = {1, 0, -1, 0};

int dy[4] = {0, 1, 0, -1};



//-------------------------------------



vector<ll> dp(100010, 0);



int main()

{

    cin.tie(0);

    ios::sync_with_stdio(false);

    ll n, m;

    cin >> n >> m;

    set<ll> a;

    for (ll i = 0; i < m; i++)

    {

        int t;

        cin >> t;

        a.insert(t);

    }

    dp[0] = 1;

    dp[1] = 1;

    for (ll i = 2; i <= n; i++)

    {

        dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;

        if (a.count(i - 1))

        {

            dp[i] = dp[i] - dp[i - 1] + MOD;

        }

        if (a.count(i - 2))

        {

            dp[i] = (dp[i] - dp[i - 2]) + MOD;

        }

    }

    cout << dp[n] % MOD << endl;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

template <class T>

inline bool chmax(T &a, T b)

{

    if (a < b)

    {

        a = b;

        return 1;

    }

    return 0;

}

template <class T>

inline bool chmin(T &a, T b)

{

    if (a > b)

    {

        a = b;

        return 1;

    }

    return 0;

}

typedef long long int ll;

    

#define EPS (1e-7)

#define INF (1<<30)

#define LLINF (1LL<<60)

#define PI (acos(-1))

#define MOD (1000000007)

#define ALL(v) (v).begin(), (v).end()

#define RALL(v) (v).rbegin(), (v).rend()

const int dx[4] = {1, 0, -1, 0};

const int dy[4] = {0, 1, 0, -1};



//-------------------------------------



ll dp[100010];



int main()

{

    cin.tie(0);

    ios::sync_with_stdio(false);

    ll n,m;

    cin>>n>>m;

    set<ll> se;

    for(ll i=0;i<m;i++){

        ll a;

        cin>>a;

        se.insert(a);

    }

    dp[0]=1;

    dp[1]=1;

    for(ll i=2;i<=n;i++){

        if(!se.count(i-1)){

            (dp[i]+=dp[i-1])%=MOD;

        }

        if(!se.count(i-2)){

            (dp[i]+=dp[i-2])%=MOD;

        }

    }

    cout<<dp[n]<<endl;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



#define li long long int



const int N = 1e5 + 3;

const li mod = 1e9 + 7;



int n, m;

int broken[N];

li dp[N];



li go(int pos) {

	if (broken[pos]) return 0;

	if (pos >= n) return pos == n;

	if (dp[pos] != -1) return dp[pos];

	li ans = go(pos + 1) + go(pos + 2);

	ans %= mod;

	return dp[pos] = ans;

}



void solve() {

	cin >> n >> m;

	for (int i = 1; i <= m; i++) {

		int x;

		cin >> x;

		broken[x] = 1;

	}

	memset(dp, -1, sizeof(dp));

	li ans = go(0);

	cout << ans;

}



int main() {

	int t = 1;

	// cin >> t;

	while (t--) {

		solve();

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;



const long long MOD = 1e9 + 7;



int N, M;

// DPテーブル、0-N段までのDP値を管理する

// 数え上げのため、初期値は0

long long dp[100100] = {0LL};

// 何段目が壊れているかを管理する配列

bool is_broken[100100] = {false};



int main() {

  scanf("%d%d", &N, &M);

  for (int i = 0; i < M; i++) {

    int a = 0;

    scanf("%d", &a);

    is_broken[a] = true;

  }

  // 足場0は初期値1, 初期値1とみなすことで、

  // フィボナッチ数列のN番目の項を求める問題と同じように解くことができる

  // {1, 1, 2, 3, 5, ... , N}

  // ただし、dp値を更新する際に、足場が壊れているかを確認する

  dp[0] = 1LL; 

  for (int i = 0; i < N; i++) {

    if (is_broken[i]) continue;

    if (!is_broken[i + 1]) dp[i + 1] = (dp[i + 1] + dp[i]) % MOD;

    if (!is_broken[i + 2]) dp[i + 2] = (dp[i + 2] + dp[i]) % MOD;

  }



  cout <<dp[N] << endl;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

const int MOD = 1e9 + 7;

const int MAX_N = 100100;



int N, M;

vector<bool> Broken;

long long dp[MAX_N];



void input(){

    cin >> N >> M;

    Broken.assign(N, false);

    for (int i = 0; i < M; i++) {

        int a; cin >> a;

        Broken[a] = true;

    }

    for (int i = 0; i < MAX_N; i++) {

        dp[i] = -1;

    }

    dp[0] = 1;

    dp[1] = ((Broken[1]) ? 0 : 1);

}



int DP(int n){

    if (Broken[n]) return dp[n] = 0;

    if (dp[n] != -1) return dp[n];

    return dp[n] = ((DP(n - 1) + DP(n - 2)) % MOD);

}



int main(){

    input();

    DP(N);

    cout << dp[N] << endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

const int MOD = 1e9+7;



template<int mod> struct ModInt {

    int x;

    ModInt() : x(0) {}

    ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}

    ModInt &operator+=(const ModInt &p) { if((x += p.x) >= mod) x -= mod; return *this; }

    ModInt &operator-=(const ModInt &p) { if((x += mod-p.x) >= mod) x -= mod; return *this; }

    ModInt &operator*=(const ModInt &p) { x = (int)(1LL*x*p.x%mod); return *this; }

    ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; }

    ModInt operator-() const { return ModInt(-x); }

    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }

    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }

    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }

    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }

    bool operator==(const ModInt &p) const { return x == p.x; }

    bool operator!=(const ModInt &p) const { return x != p.x; }

    ModInt inverse() const {

        int a = x, b = mod, u = 1, v = 0, t;

        while(b > 0) { t = a/b; a -= t*b; swap(a, b); u -= t*v; swap(u, v); }

        return ModInt(u);

    }

    ModInt pow(int e){

        long long a = 1, p = x;

        while(e > 0) {

            if (e%2 == 0) { p = (p*p)%mod; e /= 2; }

            else { a = (a*p)%mod; e--; }

        }

        return ModInt(a);

    }

    friend ostream &operator<<(ostream &os, const ModInt<mod> &p) {

        return os << p.x;

    }

    friend istream &operator>>(istream &is, ModInt<mod> &a) {

        long long x;

        is >> x;

        a = ModInt<mod>(x);

        return (is);

    }

};



using modint = ModInt<MOD>;



int main() {

    int n, m;

    cin >> n >> m;

    vector<modint> dp(n+1, 0);

    vector<bool> step(n+1, 1);

    for (int i = 0; i < m; i++) {

        int a;

        cin >> a;

        step[a] = 0;

    }

    

    dp[0] = 1;

    if (step[1]) dp[1] = 1;

    

    for (int i = 2; i <= n; i++) if (step[i]) {

        dp[i] = dp[i-1] + dp[i-2];

    }

    

    cout << dp[n] << endl;

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <vector>

using namespace std;

const int MAX_N = 100100;

const long long MOD = 1000000007;



int main() {

    int n, m;

    cin >> n >> m;

    vector<long long> dp(MAX_N, 0);

    vector<bool> step(MAX_N, true);



    for (int i = 0; i < m; i++) {

        int a;

        cin >> a;

        step.at(a) = false;

    }



    dp.at(0) = 1;

    if (step.at(1) == true) {

        dp.at(1) = 1;

    }



    for (int i = 2; i <= n; i++) {

        if (step.at(i) == false) continue;

        dp.at(i) = dp.at(i-1) + dp.at(i-2);

        dp.at(i) %= MOD;

    }



    cout << dp.at(n) << endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

const int MOD = 1e9+7;



template<int mod> struct ModInt {

    int x;

    ModInt() : x(0) {}

    ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}

    ModInt &operator+=(const ModInt &p) { if((x += p.x) >= mod) x -= mod; return *this; }

    ModInt &operator-=(const ModInt &p) { if((x += mod-p.x) >= mod) x -= mod; return *this; }

    ModInt &operator*=(const ModInt &p) { x = (int)(1LL*x*p.x%mod); return *this; }

    ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; }

    ModInt operator-() const { return ModInt(-x); }

    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }

    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }

    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }

    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }

    bool operator==(const ModInt &p) const { return x == p.x; }

    bool operator!=(const ModInt &p) const { return x != p.x; }

    ModInt inverse() const {

        int a = x, b = mod, u = 1, v = 0, t;

        while(b > 0) { t = a/b; a -= t*b; swap(a, b); u -= t*v; swap(u, v); }

        return ModInt(u);

    }

    ModInt pow(int e){

        long long a = 1, p = x;

        while(e > 0) {

            if (e%2 == 0) { p = (p*p)%mod; e /= 2; }

            else { a = (a*p)%mod; e--; }

        }

        return ModInt(a);

    }

    friend ostream &operator<<(ostream &os, const ModInt<mod> &p) {

        return os << p.x;

    }

    friend istream &operator>>(istream &is, ModInt<mod> &a) {

        long long x;

        is >> x;

        a = ModInt<mod>(x);

        return (is);

    }

};



using modint = ModInt<MOD>;



int main() {

    int n, m;

    cin >> n >> m;

    vector<modint> dp(n+1, 0);

    vector<bool> step(n+1, 1);

    for (int i = 0; i < m; i++) {

        int a;

        cin >> a;

        step[a] = 0;

    }

    

    dp[0] = 1;

    if (step[1]) dp[1] = 1;

    

    for (int i = 2; i <= n; i++) if (step[i]) {

        dp[i] = dp[i-1] + dp[i-2];

    }

    

    cout << dp[n] << endl;

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):


#include <algorithm>

#include <iostream>

#include <vector>



using namespace std;



typedef long long ll;

typedef pair<ll, ll> P;



#define MOD 1000000007

#define REP(i, N) for (int i = 0; i < N; ++i)

#define REP1(i, N) for (int i = 1; i <= N; ++i)

#define RREP(i, N) for (int i = N - 1; i >= 0; --i)

#define ALL(a) a.begin(), a.end()



int main() {

  int n, m;

  cin >> n >> m;

  bool ok[n + 1];

  REP(i, n + 1) ok[i] = true;

  REP(i, m) {

    int a;

    cin >> a;

    ok[a] = false;

  }

  ll dp[101010] = {};

  dp[0] = dp[1] = 1;

  for (int i = 2; i <= n; ++i) {

    if (ok[i - 1]) {

      dp[i] += dp[i - 1];

      dp[i] %= MOD;

    }

    if (ok[i - 2]) {

      dp[i] += dp[i - 2];

      dp[i] %= MOD;

    }

  }

  cout << dp[n] << endl;

  return 0;

}

// Optimized solution to the same problem (faster):
#include <algorithm>

#include <cmath>

#include <cstdio>

#include <deque>

#include <iostream>

#include <map>

#include <numeric>

#include <queue>

#include <set>

#include <stack>

#include <string>

#include <vector>



using namespace std;



typedef long long ll;



#define MOD 1000000007



int main() {

  int n, m;

  cin >> n >> m;

  vector<bool> ok(n + 1, true);

  for (int i = 0; i < m; ++i) {

    int a;

    cin >> a;

    ok[a] = false;

  }

  vector<ll> dp(n + 2, 0);

  dp[0] = 1;

  for (int i = 0; i < n; ++i) {

    if (ok[i]) {

      dp[i + 1] += dp[i];

      dp[i + 1] %= MOD;

      dp[i + 2] += dp[i];

      dp[i + 2] %= MOD;

    }

  }

  cout << dp[n] << endl;

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

const int inf=0x3f3f3f3f;

const long long mod=1e9+7;

long long n,m;

long long dp[100000+10];

long long sum;

int main()

{

    cin>>n>>m;

    for(int i=1;i<=m;i++)

    {

        int a;

        cin>>a;

        dp[a]=-inf;

    }

    dp[0]=-inf;

    for(int i=0;i<=n;i++)

    {

        if(dp[i]==-inf)

        {

            if(dp[i+1]==-inf)

            {

                if(i!=0)

                {

                    cout<<"0";

                    return 0;

                }

                else

                {

                    if(dp[2]==-inf)

                    {

                        cout<<"0";

                        return 0;

                    }

                    else

                    {

                        dp[2]=1;

                        dp[1]=0;

                        continue;

                    }

                }

            }

            else

            {

                if(i!=0)

                {

                    dp[i+1]=dp[i-1];

                    dp[i]=0;

                    continue;

                }

                else

                {

                    dp[1]=1;

                    dp[0]=1;

                    continue;

                }

            }

        }

        if(dp[i]==1||i==1)  continue;

        dp[i]=dp[i-2]+dp[i-1];

        dp[i]%=mod;

    }

    sum=dp[n];

    cout<<sum%mod;

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#define ll long long

const ll mod=1e9+7;

const int N=1e5+9;

ll vis[N],a[N];

int main()

{

    int t,n,x;

    scanf("%d%d",&t,&n);

    for(int i=1;i<=n;i++)

    {

        scanf("%d",&x);

        vis[x]=1;

    }

    a[0]=1;

    if(!vis[1]) a[1]=1;

    for(int i=2;i<=t;i++)

    {

        if(vis[i]) continue;

        a[i]=(a[i-1]+a[i-2])%mod;

//        printf("%lld  a[i],  %d  i\n",a[i],i);

    }

    printf("%lld\n",a[t]);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
//بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ

#include <bits/stdc++.h>

using namespace std;

bool a[100001]{};

long long memo[100001];

int n, m;



long long climb(int i){

    if(memo[i] > -1) return memo[i];

    long long v = 0;

    if(i == n) return 1;

    if(!a[i+1]) v += climb(i+1);

    v %= 1000000007ll;

    if(i < n-1 && !a[i+2]) v += climb(i+2);

    v %= 1000000007ll;

    memo[i] = v;

    return v;

}



int main(){

    ios_base::sync_with_stdio(false);

    cin.tie(NULL);

    memset(memo, -1, sizeof(memo));

    cin >> n >> m;

    for(int i = 0, tmp = 0; i < m; i++){

        cin >> tmp;

        a[tmp] = true;

    }

    cout << climb(0);

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#define ll long long

const ll mod=1e9+7;

const int N=1e5+9;

ll vis[N],a[N];

int main()

{

    int t,n,x;

    scanf("%d%d",&t,&n);

    for(int i=1;i<=n;i++)

    {

        scanf("%d",&x);

        vis[x]=1;

    }

    a[0]=1;

    if(!vis[1]) a[1]=1;

    for(int i=2;i<=t;i++)

    {

        if(vis[i]) continue;

        a[i]=(a[i-1]+a[i-2])%mod;

//        printf("%lld  a[i],  %d  i\n",a[i],i);

    }

    printf("%lld\n",a[t]);

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<stdio.h>

#include<string.h>

#include<math.h>

#include<iostream>

#include<algorithm>

#include<queue>

using namespace std;

int a[1000000];

long long sum[1000000];

bool vis[1000000];

int main()

{

    int n,m;

    scanf("%d%d",&n,&m);

    memset(vis,0,sizeof(vis));

    memset(a,0,sizeof(a));

    for(int i=1;i<=m;i++)

    {

        scanf("%d",&a[i]);

        vis[a[i]]=1;

    }

    if(vis[1]==1)

        sum[1]=0;

    else

        sum[1]=1;

    if(vis[2]==1)

        sum[2]=0;

    else

        sum[2]=sum[1]+1;

    for(int i=3;i<=n;i++)

    {

        if(vis[i-1]==0&&vis[i-2]==0)

            sum[i]=sum[i-1]%1000000007+sum[i-2]%1000000007;

        if(vis[i-1]==1&&vis[i-2]==0)

            sum[i]=sum[i-2]%1000000007;

        if(vis[i-1]==0&&vis[i-2]==1)

            sum[i]=sum[i-1]%1000000007;

        if(vis[i-1]==1&&vis[i-2]==1)

        {

            sum[n]==0;

            break;

        }

    }

    printf("%lld",sum[n]%1000000007);

        return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#define ll long long

const ll mod=1e9+7;

const int N=1e5+9;

ll vis[N],a[N];

int main()

{

    int t,n,x;

    scanf("%d%d",&t,&n);

    for(int i=1;i<=n;i++)

    {

        scanf("%d",&x);

        vis[x]=1;

    }

    a[0]=1;

    if(!vis[1]) a[1]=1;

    for(int i=2;i<=t;i++)

    {

        if(vis[i]) continue;

        a[i]=(a[i-1]+a[i-2])%mod;

//        printf("%lld  a[i],  %d  i\n",a[i],i);

    }

    printf("%lld\n",a[t]);

    return 0;

}


// Fastest known solution for this problem: