#include <bits/stdc++.h>
using namespace std;
struct edge {
  int u, v;
  long long w;
};
long long MOD = 1000000007;
long long _MOD = 1000000009;
double EPS = 1e-10;
int n, m;
int main() {
  cin >> n >> m;
  long long dp[100001] = {0};
  int a[100000] = {0};
  dp[0] = 1;
  for (int i = (0); i < (m); i++) {
    int tmp;
    cin >> tmp;
    a[tmp] = 1;
  }
  for (int i = (0); i < (n); i++) {
    if (a[i + 1] == 0) dp[i + 1] += dp[i];
    dp[i + 1] %= MOD;
    if (a[i + 2] == 0) dp[i + 2] += dp[i];
    dp[i + 2] %= MOD;
  }
  cout << dp[n] << endl;
}
