#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define REPS(i,n,s) for(int i=s;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n,m;
  cin >> n >> m;

  vector<int> oks(n+1, true);
  REP(i, m) {
    int a;
    cin >> a;
    oks[a] = false;
  }

  vector<long long int> dp(n+1);
  dp[0] = 1;
  REP(now, N) {
    for(int next = now+1;next<=min(N, now+2); ++next) {
      if(oks[next]) {
        dp[next] += dp[now];
        dp[next] %= 1e9+7;
      }
    }
  }

  cout << dp[n] << endl;
  return 0;
}
