#include <bits/stdc++.h>
int main() {
  int N, M, a;
  long long int stairs[100000] = {};
  int broken[100000];
  scanf("%d %d", &N, &M);
  for (int i = 0; i < M; i++) {
    scanf("%d", &broken[i]);
  }
  int j = 0;
  for (int i = 0; i < N; i++) {
    if ((i == 0) || (i == 1)) {
      stairs[i] = 1 + i;
    } else if (i == broken[j] - 1) {
      j++;
      continue;
    } else {
      stairs[i] += stairs[i - 1];
      stairs[i] = stairs[i] % 1000000007;
      stairs[i] += stairs[i - 2];
      stairs[i] = stairs[i] % 1000000007;
    }
  }
  printf("%d", stairs[N - 1] % 1000000007);
  return 0;
}
