#include <bits/stdc++.h>
using namespace std;
long long n, m;
bool a[100005];
long long dp[100005];
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int num;
    cin >> num;
    a[num - 1] = 1;
  }
  dp[0] = 1;
  dp[1] = 2;
  for (int i = 2; i < n; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    if (a[i - 1] == 1) dp[i] = dp[i] - dp[i - 1];
    if (a[i - 2] == 1) dp[i] = dp[i] - dp[i - 2];
    if (a[i] == 1) dp[i] = 0;
    dp[i] %= 1000000007;
  }
  cout << (dp[n - 1] % 1000000007) << "\n";
  return 0;
}
