#include <bits/stdc++.h>
int n, m, a[100001], b[100001];
long way(int j) {
  long count = 0;
  if (j == 0)
    return 0;
  else if (j == 1) {
    if (b[j] == 0)
      return 1;
    else
      return 0;
  } else {
    if (b[j - 1] == 0) count += way(j - 1);
    if (b[j - 2] == 0) count += way(j - 2);
    return count;
  }
}
int main() {
  int i;
  fscanf(stdin, "%d %d", &n, &m);
  for (i = 0; i < n + 1; i++) {
    b[i] = 0;
  }
  for (i = 0; i < m; i++) {
    fscanf(stdin, "%d", &a[i]);
    b[a[i] + 1] = 1;
  }
  printf("%d\n", way(n + 1) % 1000000007);
  return 0;
}
