#include <bits/stdc++.h>
using namespace std;
const float INF = numeric_limits<float>::infinity();
const int MOD = 1e9 + 7;
const double PI = 3.14159265358979323846264338;
const long long big = 998244353;
int maxi(int a, int b, int c) {
  int d = max(a, b);
  return max(d, c);
}
int mini(int a, int b, int c) {
  int d = min(a, b);
  return min(d, c);
}
int checker(int i, int n, int a[]) {
  for (int x(1); x < n + 1; ++x) {
    if (a[x] == i) return true;
  }
  return false;
}
int dp[100001];
bool go[100001];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i(0); i < m; ++i) {
    int x;
    cin >> x;
    go[x] = true;
  }
  dp[1] = 1;
  dp[2] = 2;
  for (int i(3); i <= n; ++i) {
    if (!go[i]) {
      dp[i] = (dp[i - 1]) % MOD + (dp[i - 2]) % MOD;
    } else {
      dp[i] = 0;
    }
  }
  cout << (dp[n]) % MOD;
}
