#include <bits/stdc++.h>
void llswap(long long int *x, long long int *y) {
  long long int temp;
  temp = *x;
  *x = *y;
  *y = temp;
}
void swap(int *x, int *y) {
  int tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
}
int rmax(int x, int y) { return x > y ? x : y; }
int rmin(int x, int y) { return x > y ? y : x; }
long long int llrmax(long long int x, long long int y) { return x > y ? x : y; }
long long int llrmin(long long int x, long long int y) { return x > y ? y : x; }
int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int desc(const void *a, const void *b) { return *(int *)b - *(int *)a; }
int llasc(const void *a, const void *b) {
  return *(long long int *)a - *(long long int *)b;
}
int lldesc(const void *a, const void *b) {
  return *(long long int *)b - *(long long int *)a;
}
int main() {
  int n, m;
  static int stair[200000] = {}, a[200000];
  static unsigned long long int dp[200000] = {};
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d", &a[i]);
    stair[a[i] - 1] = 1;
  }
  dp[0] = 1;
  if (stair[0] != 1) {
    dp[1] = 1;
  }
  for (int i = 1; i < n; i++) {
    if (stair[i] != 1) {
      dp[i + 1] = dp[i] + dp[i - 1];
    }
  }
  printf("%llu\n", dp[n] % 1000000007);
  return 0;
}
