#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int cannot_setfoot[100005];
int dp[100005];
int n, m;
int backtrack(int i) {
  if (i > n)
    return 0;
  else if (i == n)
    return 1;
  else if (cannot_setfoot[i])
    return 0;
  else if (dp[i] != 0)
    return dp[i];
  return (dp[i] = (backtrack(i + 1) + backtrack(i + 2)) % mod);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    cannot_setfoot[x] = 1;
  }
  cout << backtrack(0) << endl;
  return 0;
}
