#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
long long int a[100005];
int solve(int n) {
  if (mp[n] == 1) return 0;
  if (n <= 0) return n + 1;
  if (a[n] == 0)
    return a[n] = (solve(n - 1) + solve(n - 2)) % 1000000007;
  else
    return a[n];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  int val;
  for (int i = 0; i < m; i++) {
    cin >> val;
    mp[val] = 1;
  }
  solve(n);
  cout << a[n] << "\n";
  return 0;
}
