#include <bits/stdc++.h>
using namespace std;
int N, M;
long long dp[100005];
bool a[100005];
int main() {
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int b;
    cin >> b;
    a[b] = true;
  }
  dp[0] = 1;
  for (int i = 0; i < N; i++) {
    for (int j = 1; j < 3; j++) {
      if (!a[i + j]) dp[i + j] += dp[i];
    }
    dp[i] %= 1000000007;
  }
  cout << dp[N] % 1000000007 << endl;
}
