#include <bits/stdc++.h>
using namespace std;
long long dp[100000];
int goal;
long long solve(int step) {
  if (step == goal) {
    return 1;
  } else if (step > goal || dp[step] < 0) {
    return 0;
  } else if (dp[step] > 0) {
    return dp[step];
  }
  return dp[step] = solve(step + 1) + solve(step + 2);
}
int main() {
  int n, m;
  cin >> n >> m;
  goal = n;
  for (int i = 0; i < m; ++i) {
    int step;
    cin >> step;
    dp[step] = -1;
  }
  solve(0);
  cout << dp[0] % 1000000007 << endl;
  return 0;
}
