#include <bits/stdc++.h>
using namespace std;
int N, M;
int step[100000];
int rec(int s, int sum) {
  if (s == N) return sum + 1;
  if (s > N) return sum;
  if (step[s] == 0) return sum;
  sum = rec(s + 1, sum);
  sum = rec(s + 2, sum);
  return sum;
}
int main(void) {
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    step[i] = 1;
  }
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    step[a] = 0;
  }
  int ans = rec(0, 0) % 1000000007;
  cout << ans << endl;
  return 0;
}
