#include <bits/stdc++.h>
using namespace std;
vector<long long int> stairs_table(10100, 1);
vector<long long int> dp(10100, 0);
int main() {
  long long int n, m;
  cin >> n >> m;
  long long int a;
  for (int i = 0; i < m; i++) {
    cin >> a;
    stairs_table[a] = 0;
  }
  dp[0] = 1;
  for (int i = 0; i <= n; i++) {
    dp[i] *= stairs_table[i];
    dp[i] %= 1000000007;
    dp[i + 1] += dp[i];
    dp[i + 2] += dp[i];
  }
  cout << dp[n] << endl;
}
