#include <bits/stdc++.h>
using namespace std;
bitset<100001> trap;
long long dp[(long long)(2 * 1e5)];
long long solve(long long n) {
  dp[0] = 1;
  dp[1] = trap[1] ? 0 : 1;
  for (long long i = 2; i <= n; i++) {
    if (trap[i])
      dp[i] = 0;
    else
      dp[i] = dp[i - 1] + dp[i - 2];
  }
  return dp[n] % (long long)(1e9 + 7);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  srand(time(NULL));
  long long n, m, pos;
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    cin >> pos;
    trap[pos] = true;
  }
  cout << solve(n) << endl;
  return 0;
}
