#include <bits/stdc++.h>
int n, m, i, a[100010];
int min(int a, int b) { return a < b ? a : b; }
int main(void) {
  int dp[100010];
  scanf("%d %d", &n, &m);
  for (i = 0; i < m; i++) {
    int f;
    scanf("%d", &f);
    a[f] = 1;
  }
  dp[0] = 1;
  dp[1] = (a[1] == 0 ? 1 : 0);
  for (i = 2; i < n; i++) {
    if (a[i] == 0) {
      dp[i] = (dp[i - 2] + dp[i - 1]) % 1000000007;
    } else
      dp[i] = 0;
  }
  printf("%d", dp[n - 1]);
  return 0;
}
