#include <bits/stdc++.h>
using namespace std;
int a[100001];
int main() {
  int n, m, b;
  long long dp[100005];
  dp[0] = 1LL;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &b);
    a[b] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (a[i + 1] == 0) {
      dp[i + 1] += dp[i];
      dp[i + 1] %= 1000000007;
    }
    if (a[i + 2] == 0) {
      dp[i + 2] += dp[i];
      dp[i + 2] %= 1000000007;
    }
  }
  printf("%d\n", dp[n]);
}
