#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  int n,m;
  vector<int> broken(m+1);
  rep(i,m){
  int a;
  cin>>a;
    broken[a]=1;
  }
  vector<int>dp(n+2);
  for(int n-1;i>=0;i--){
    if(broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i]=(d[i+2]+dp[i+1])%1000000007;
  }
  cout<<dp[0]<<endl;
}