#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int N, M;
long long dp[100010];
int a[100010];
long long W(int i) {
  if (dp[i] > -1) return dp[i];
  if (i == 0) return dp[0] = 1;
  if (i == 1) return dp[1] = dp[0] + 1;
  return dp[i] = (W(i - 1) + W(i - 2)) % mod;
}
int main() {
  int N, M;
  cin >> N >> M;
  for (int i = 0; i < N; i++) dp[i] = -1;
  for (int i = 0; i < M; i++) cin >> a[i];
  for (int i = 0; i < M; i++) dp[a[i] - 1] = 0;
  cout << W(N - 1) << endl;
}
