#include <bits/stdc++.h>
using namespace std;
vector<long long> dp(100010);
long long nota[100010];
long long rec(int i, vector<long long> &dp) {
  if (i == 0) return 0;
  long long x = 1000000007;
  if (dp[i] != -1) {
    if (i == 1) return dp[i] = 1;
    if (i > 1) {
      dp[i] = (rec(i - 1, dp) + 1 + rec(i - 2, dp) + 1 + x) % x;
    }
    return dp[i];
  } else
    return dp[i];
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < 100010; i++) {
    cin >> nota[i];
    dp[i] = 0;
  }
  for (int i = 0; i < m; i++) {
    dp[nota[i]] = -1;
  }
  cout << rec(n, dp) << endl;
}
