#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long to, cost;
};
const long long INF = 100000000000000000;
const long long INF2 = 9223372036854775807;
const long long MOD = 1000000007;
long long ceil2(long long a, long long b) {
  if (a % b == 0) {
    return a / b;
  } else {
    return a / b + 1;
  }
}
long long pow2(long long a, long long b) {
  long long r = 1;
  for (long long i = 1; i <= b; i++) {
    r *= a;
  }
  return r;
}
long long Log2(long long a) {
  long long t = 0;
  while (1) {
    if (a == 0 || a == 1) {
      break;
    }
    a /= 2;
    t++;
  }
  return t;
}
long long N, M;
long long A[100010];
long long dp[100010];
set<long long> U;
long long DP(long long a) {
  if (dp[a] != -1) return dp[a];
  if (U.find(a) != U.end()) {
    return 0;
  }
  if (a > N - 1) {
    return 0;
  }
  if (a == N - 1) {
    return 1;
  }
  return dp[a] = (DP(a + 1) + DP(a + 2)) % MOD;
}
signed main() {
  cin >> N >> M;
  for (long long i = 0; i < (long long)(M); i++) {
    cin >> A[i];
    U.insert(A[i] - 1);
  }
  for (long long i = 0; i < (long long)(100010); i++) {
    dp[i] = -1;
  }
  long long ans = DP(0) + DP(1);
  cout << ans << endl;
  return 0;
}
