#include <bits/stdc++.h>
using namespace std;
unsigned long long dp(int index, vector<int> &memo, vector<int> &arr) {
  if (index >= arr.size()) return 0;
  if (arr[index] == -1) return 0;
  if (index == arr.size() - 1) return 1;
  if (memo[index] != -1) return memo[index];
  unsigned long long result = 0;
  result += dp(index + 1, memo, arr);
  result += dp(index + 2, memo, arr);
  memo[index] = result;
  return result;
}
int main() {
  int n;
  int m;
  cin >> n >> m;
  vector<int> numbers(n + 1);
  vector<int> memo(n + 2);
  for (int i = 0; i < memo.size(); i++) memo[i] = -1;
  for (int i = 0; i < m; i++) {
    int index;
    cin >> index;
    numbers[index] = -1;
  }
  unsigned long long solution = dp(0, memo, numbers) % 1000000007;
  cout << solution;
  return 0;
}
