#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  set<long long> s;
  long long a[m];
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    s.insert(a[i]);
  }
  long long** dp = new long long*[n + 1];
  for (int i = 0; i <= n; i++) {
    dp[i] = new long long[n + 1]();
  }
  dp[n][n] = 0;
  dp[n - 1][n] = 1;
  dp[n - 2][n] = 2;
  dp[n - 2][n - 1] = 1;
  for (int i = n - 3; i >= 0; i--) {
    if (s.find(i) != s.end()) {
      continue;
    }
    for (int j = i + 1; j <= n; j++) {
      if (s.find(j) != s.end()) {
        continue;
      }
      if (j > i + 2) dp[i][j] = (dp[i + 1][j] + dp[i + 2][j]) % 1000000007;
      if (j == i + 1) {
        dp[i][j] = 1;
      }
      if (j == i + 2) {
        dp[i][j] = 2;
      }
    }
  }
  long long ans = dp[0][n];
  for (int i = 0; i < m; i++) {
    ans = ans - dp[a[i]][n] - dp[0][a[i]];
  }
  cout << ans;
  for (int i = 0; i <= n; i++) delete[] dp[i];
  delete[] dp;
}
