#include <bits/stdc++.h>
int count;
void upstairs(int, int, int, int *);
int check(int, int, int, int *);
int main() {
  int N;
  int M;
  int i;
  int position;
  scanf("%d %d", &N, &M);
  int a[M];
  for (i = 0; i < M; ++i) {
    scanf("%d", &a[i]);
  }
  count = 0;
  upstairs(N, M, 0, a);
  count = count % 100000007;
  printf("%d", count);
}
void upstairs(int N, int M, int position, int *a) {
  if (N == position) {
    count++;
    return;
  }
  if (check(N, M, position + 1, a)) {
    upstairs(N, M, position + 1, a);
  }
  if (check(N, M, position + 2, a)) {
    upstairs(N, M, position + 2, a);
  }
  return;
}
int check(int N, int M, int position, int *temp) {
  int i;
  for (i = 0; i < M; i++) {
    if (position == temp[i] || N < position) {
      return 0;
    }
  }
  return 1;
}
