#include <bits/stdc++.h>
using namespace std;
long long dp[100025] = {};
bool br[100000] = {};
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    br[a] = true;
  }
  dp[0] = 1;
  for (int i = 0; i < n; i++) {
    if (!br[i + 1]) dp[i + 1] = (dp[i] + dp[i + 1]) % 1000000007LL;
    if (!br[i + 2]) dp[i + 2] = (dp[i] + dp[i + 2]) % 1000000007LL;
  }
  cout << dp[n] << endl;
}
