#include <bits/stdc++.h>
long Fib(long n);
int main() {
  long i;
  long a[100000];
  long n, m;
  long sum = 1;
  scanf("%ld %ld", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%ld", &a[i]);
  }
  if (m == 0) {
    printf("%ld", Fib(n));
    return (0);
  }
  sum *= Fib(a[0] - 1) % 1000000007;
  for (i = 0; i < m - 1; i++) {
    sum *= Fib(a[i + 1] - a[i] - 2) % 1000000007;
  }
  sum *= Fib(n - a[m - 1] - 1) % 1000000007;
  printf("%ld", sum % 1000000007);
}
long Fib(long n) {
  if (n == -1) {
    return (0);
  }
  int i;
  int a = 1, b = 1;
  int tmp;
  for (i = 0; i < n; i++) {
    tmp = a;
    a = a + b;
    b = tmp;
  }
  return (b);
}
