#include <bits/stdc++.h>
using namespace std;
int a[100000];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    if (i > 0 && a[i - 1] + 1 >= a[i]) {
      cout << 0 << endl;
      return 0;
    }
  }
  sort(a, a + m);
  int p = 0;
  if (m == 0) {
    a[0] = 10000000;
  }
  long long result = 1;
  long long dp[2];
  dp[0] = 1;
  if (a[0] != 1) {
    dp[1] = 1;
  } else {
    dp[1] = 0;
  }
  for (int i = 0; i <= n; i += 2) {
    if (i == n) {
      cout << dp[0] << endl;
      return 0;
    } else if (i == n - 1) {
      cout << dp[0] + dp[1] << endl;
      return 0;
    } else if (i == a[p]) {
      dp[0] = 0;
      p++;
    } else if (i == a[p] - 1) {
      dp[1] = dp[0];
      if (p < m - 1 && a[p + 1] == i + 3) {
        dp[0] = 0;
      }
      p++;
    } else {
      dp[0] = dp[0] + dp[1];
      dp[1] = dp[0] + dp[1];
      dp[0] %= 1000000007;
      dp[1] %= 1000000007;
    }
  }
  return 0;
}
