#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int N, M;
long long dp[100100] = {0LL};
bool is_broken[100100] = {false};
int rec(int i) {
  if (is_broken[i]) return 0;
  if (dp[i] > 0) return dp[i];
  dp[i] += rec(i - 1);
  if (i > 1) dp[i] += rec(i - 2);
  return dp[i] %= MOD;
}
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 0; i < M; i++) {
    int a = 0;
    scanf("%d", &a);
    is_broken[a] = true;
  }
  dp[0] = 1LL;
  cout << rec(N) << endl;
}
