#include <bits/stdc++.h>
using namespace std;
const int MXX = 1e5 + 5;
const int MOD = 1000000007;
long long int a[MXX], n, m;
long long int dp[MXX];
bool vis[MXX];
long long int solve(long long int i) {
  if (i == n) return 1;
  if (i > n) return 0;
  if (vis[i]) return 0;
  if (dp[i] != -1) return dp[i];
  long long int x = solve(i + 1);
  long long int y = solve(i + 2);
  return dp[i] = x + y;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; i++) cin >> a[i], vis[a[i]] = true;
  memset(dp, -1, sizeof(dp));
  cout << solve(0) % MOD;
  return 0;
}
