#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
using namespace std;
typedef long long ll;
ll dp[100005]={0};
const int mod=1000000007;
int main(){
  int n,m;
  cin>>n>>m;
  queue<int> out;
  for(int i=0;i<m;i++){
    int a;
    cin>>a;
    out.push(a);
  }
  dp[0]=1;
  for(int i=0;i<n;i++){
    if(!que.empty()){
      if(out.front()==i){
        while(out.front()==i&&!que.empty()) out.pop();
        continue;
      }
    }
    dp[i+1]+=dp[i];
    dp[i+1]%=mod;
    dp[i+2]+=dp[i];
    dp[i+2]%=mod;
  }
  cout<<dp[n]<<endl;
}
