// Original C++ solution (slower):
#include <bits/stdc++.h>

typedef long long ll;

using namespace std;

 

const int N = 1e5 + 10 , M = 5e5+10 ,  MOD = 1e9+7;

const int OO = 0x3f3f3f3f;

const double EPS = 1e-3;

 

#define clr(arr,val) memset(arr , val , sizeof (arr))

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

#define rloop(i,n) for(int i = int(n)-1;i >= 0;i--)

#define range(i,a,b) for(int i = int(a);i <= int(b);i++)

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

#define SZ(v)  ((int)((v).size()))

typedef pair <int,int> pii ;

typedef vector < pii > vii ;

typedef vector < int > vi;

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

//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};//8 direction

//int dx[]={2,1,-1,-2,-2,-1,1,2};int dy[]={1,2,2,1,-1,-2,-2,-1};//Knight Direction

//int dx[6]={2,1,-1,-2,-1,1};int dy[6]={0,1,1,0,-1,-1}; //Hexagonal Direction

//freopen("input.txt", "r", stdin);

//freopen("output.txt", "w", stdout);

 





int n, m, x;

int seen[N];

int dp[N];



int solve(int idx){

  

    if(seen[idx]) return 0;

    if(idx == n) return 1;

  //  if(idx > n) return 0;

    int &ret = dp[idx];

    if(~ret) return ret;



   // ret = 0;

    ret = (solve(idx+1) + solve(idx+2))%MOD;



    return ret;





}







 

int main()

{

    

    ios_base::sync_with_stdio(0);

    cin.tie(0);cout.tie(0);



    



    cin >> n >> m;

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

        cin >> x;

        seen[x] = 1;

    }





    memset(dp , -1 , sizeof dp);



    ll ans = solve(0);

    cout << ans << "\n";

    



 

    

    return 0;

}


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



#define rev(v) reverse(v.begin(), v.end());

#define mx(v) max_element(v.begin(), v.end());

#define mn(v) min_element(v.begin(), v.end()); 

#define fastio() ios_base::sync_with_stdio(0);cout.tie(0);cin.tie(0);srand(time(NULL));

#define mod 1000000007



//ffs = lsb, clz = l0's, ctz = r0's, popcount = 1's 

 //++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++

using namespace std;

 //++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++--++



typedef long long ll;

typedef long double ld;

typedef unsigned long long ull;



int main(){

    fastio();

    ll n,m ; cin >> n >> m;

    ll dp[n + 1];

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

        dp[i] = 0;

    }

    dp[0] = 1;

    dp[1] = 1;

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

        int x;  cin >> x;

        dp[x] = -1;

    } 

    

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

        if(dp[i] >= 0){

            if(dp[i-1] < 0  && dp[i-2] < 0 ){

                return cout << "0\n" , 0;

            }

            if(dp[i-1] < 0){

                dp[i-2] = dp[i-2] % mod;

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

            }else if(dp[i-2] < 0){

                dp[i-1] = dp[i-1] % mod;

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

            }else{

                dp[i-1] = dp[i-1] % mod;

                dp[i-2] = dp[i-2] % mod;

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

            }

            dp[i] = dp[i] % mod;

        }

    }



    return cout << dp[n] % mod, 0 ;

}

// Fastest known solution for this problem: