#include <bits/stdc++.h>
#define r(i,n) for(long long i = 0; i<n; i++)
typedef long long ll;
using namespace std;

int main() {
  ll n,m,dp[100007];
  dp[0]=1;
  cin >> n >> m;
  bool broken[n]={0};
  r(i,m){
    int x;
    cin >> x;
    broken[x]=1;
  }
  for(int i = 0; i <= n; i++){
    if(broken[i])continue;
    dp[i+1]+=dp[i];
    dp[i+2]+=dp[i];
    dp[i+1]%=1000000007;
    dp[i+2]%=1000000007;
  }
  cout<<dp[n]<<endl;
}