#include <bits/stdc++.h>
#define REP(i, n) for(int i=0;i<int(n);++i)
using namespace std;
template<class A>void pr(A a){cout << a << endl;}
template<class A,class B>void pr(A a,B b){cout << a << " "  ;p(b);}
template<class A,class B,class C>void pr(A a,B b,C c){cout << a << " " ;p(b,c);}
template<class A,class B,class C,class D>void pr(A a,B b,C c,D d){cout << a << " " ;p(b,c,d);}
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
int INF=numeric_limits<int>::max();
// for(int j=0;j<N;++j) {}

int main(void) {
  int N,M;cin>>N>>M;
  int a[N+10]={0};
  int n;
  REP(i,M) {
    cin>>n;
    a[n]=1;
  }
  ll dp[100010];
  dp[0]=1;
  dp[1]=1;
  for(int j=0;j<N+1;++j) {
    if(a[j]) {
      dp[j]=0;
    } else if(j==0||j==1)  {
      dp[j]=1;
    } else {
      dp[j]=dp[j-1]+dp[j-2];
    }
  }
  pr(dp[N]%1000000007);
  return 0;
}
