#include <bits/stdc++.h>
using namespace std;
using Int = long long int;
using Graph = vector<vector<int>>;
Int DFS(vector<Int>& dp, int c, vector<bool> broken, int n) {
  if (c > n || broken[c]) return 0;
  if (c == n)
    return 1;
  else if (dp[c] != -1)
    return dp[c];
  else
    dp[c] = 0;
  dp[c] += DFS(dp, c + 1, broken, n);
  dp[c] += DFS(dp, c + 2, broken, n);
  if (dp[c] >= 1000000007) dp[c] %= 1000000007;
  return dp[c];
}
int main() {
  int N, M;
  cin >> N >> M;
  vector<bool> broken(N, false);
  vector<Int> dp(N, -1);
  for (int i = (int)0; i < M; i++) {
    int tmp;
    cin >> tmp;
    broken[tmp] = true;
  }
  Int answer = DFS(dp, 0, broken, N);
  cout << answer << endl;
}
